|Hi all - |
Need a little help. Attempting to write a batch file to check for and delete multiple files, outputting to a log file after anything is found.
Here's what I have so far:
echo Checking for files >> C:\found.log
for /f "tokens=* delims= " %%a in (list.txt) do (
set /a N+=1
if exist f!N! echo f!N! was found >> C:\found.log
the phrase "checking for files" gets appended to the log, but it never lists any files it may have found. I want to get this part up and running before I add in the delete command. Where am I going wrong?