how can I log the file names before deleting them? forfiles.exe -p. -m*.gz -d-5 -c"cmd /c del /P @FILE"
Piping will give the lsit of all the files. I need to list only the files that is been deleted to a log file.
Thank you in advance
Did you try using the redirect command. (forefiles.exe >>your log file) before the delete command. Or, I guess you could use the "XCOPY" command, like xcopy C:\Documents\forefiles.exe
Tell me how it works out!
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |