I'm trying to look through files that start with a number and setting it as 2 different variables what I have below works mostly besides for the last part, trying to set %file!num!%
for /R %logs% %%F IN (%S%*.txt) DO (
for /f "tokens=10 delims=\" %%N IN ("%%F") DO (
set /a "num+=1"
echo !num!. %%N
set "file!num!=%%F"
)
)
%%F is the full file path for the file
%%N is just the file name
I want to set the file path %%F to %file!num!% to set it as file2 or w/e number it is