I made this batch script to separate emails and passwords in two separate files and save them from a ComboBox.txt list example this one :
Delimiters can be ":,;"
My problem is that the exclamation point "!" in a password is ignored by SetLocal EnableDelayedExpansion
So I can get all the speciaux characters except that one "!"
ComboBox.txt
hackoo@hackoo.com,&azerty123><* someone@gmail.com;He>llo123*! andrew@yahoo.com:mommy!845 Cooker124@gmail.com:my!love1547 blue@hotmail:something!b010 hello@gmail.com:something!6655
Extract_Email_Password.bat
@echo off
>nul chcp 65001
Title Extraire les emails et les passwords dans deux fichiers séparés de type ComboBox ".txt" by Hackoo 2019
Mode 85,3 & color 0A
Set "InputFile=%1"
Set "OutPutFile_Emails=%~dp0Emails_Extracted.txt"
Set "OutPutFile_Passwords=%~dp0Passwords_Extracted.txt"
If Exist "%OutPutFile_Emails%" Del "%OutPutFile_Emails%"
If Exist "%OutPutFile_Passwords%" Del "%OutPutFile_Passwords%"
If [%InputFile%] EQU [] goto :Aide
echo(
echo Patientez un peu... extraction des emails et les mots passes sont en cours ...
SetLocal EnableDelayedExpansion
@for /f "delims=:;, tokens=1,2" %%a in ('Type "%InputFile%"') do (
Set "Email=%%a"
Set "Password=%%b"
If defined Email echo !Email!>>"%OutPutFile_Emails%"
If defined Password echo !Password!>>"%OutPutFile_Passwords%"
)
EndLocal
If Exist "%OutPutFile_Emails%" Start "" "%OutPutFile_Emails%"
If Exist "%OutPutFile_Passwords%" Start "" "%OutPutFile_Passwords%"
Exit
::********************************************************************************
:Aide
Mode 90,5 & Color 0C
echo(
echo Glisser et déposer le fichier texte sur,ce script "%~nx0"
echo Pour extraire les emails et les passwords dans deux fichiers séparés !
Timeout /T 10 /NoBreak>nul
Exit
::********************************************************************************