batch code to chnage folders name after read text files
问题 Someone great in this site give me this code at batch change folder name by read line from text file @echo off pushd "your root location" for /f "tokens=1* delims=:" %%A in ( 'findstr /srbc:"SMTP_Email_Address *type=SZ *[^ ][^ ]*@[^ ][^ ]*\.[^ ][^ ]* *SMTP_Email_Address" filel.txt^|sort /r' ) do if exist "%%A" for %%F in ("%%A\..") do ( for /f "tokens=3" %%N in ("%%B") do ren "%%~fF" "%%N" ) popd the code find this code perfectly SMTP_Email_Address type=SZ name@company.com SMTP_Email_Address