BAT/CMD. For example, this loop outputs all txt files from a folder.
@echo off
FOR %%a IN (C:Users*.txt) DO echo %%a
pause
Out:
C:myfolder4234.txt
C:myfolderout88888.txt
C:myfoldertmp01.txt
C:myfoldertmp2.txt
How do I change the loop so that paths are written to variables? These variables should be used below in the script
var1 = C:myfolder4234.txt
var2 = C:myfolderout88888.txt
var3 = C:myfoldertmp01.txt
var4 = C:myfoldertmp2.txt
I do not know what to write here, I’m just asking)
New contributor
gal7979 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.