P
P
pw0ned2017-10-30 23:13:48
cmd/bat
pw0ned, 2017-10-30 23:13:48

How to pull request in Batch?

There is, for example, a mail:pass database.
It is necessary to extract the @hanmail.net domain from the batch file, namely soap and password. Then save everything to another .txt file
Please help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2017-10-31
@res2001

@echo off
set "filesrc=1.txt"
set "filedst=filedst.txt"
for /f "usebackq tokens=1,2,* [email protected]:" %%a in ("%filesrc%") do (
  1>>"%filedst%" echo.%%~a	%%~b	%%~c
)

The truth is not clear why, change the format or what?
Well then write what should be the format.
In the loop in variables:
%%~a - username (part of the email address)
%%~b - domain of the email address
%%~c - password
If there are service characters in the source file, errors will most likely appear.
Service characters include: &<>)(^%

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question