jeudi 5 septembre 2019

for and if not working if %a equal folder! from a text file how to solve this issue?

for /f "tokens=*" %a in (%userprofile%\desktop\t.txt) do if exist "%a" (echo "%a" - exist>>"%userprofile%\desktop\t1.txt") else echo "%a" - not exist>>"%userprofile%\desktop\t2.txt"

the results is ether exist or not exist folders path in the text the results always tell not exist how to solve this problem?

Aucun commentaire:

Enregistrer un commentaire