ForFiles command lets you manage or delete folders, complying with some criteria on Windows 11/10. If you want to use ForFiles command on a shared network folder or a mapped network drive, here is how ...
checking file size and if it matches the criteria, set a variable. forfiles /p e scripts\ars.cmd\logs /m 2013-06-28-err.log /c "cmd /c if @fsize equ 0 set strS=Okay" forfiles /p e scripts\ars.cmd\logs ...
I'm writing a simple batch file to move, then delete files older than 7 days. Using Robocopy for the move, then using Forfile to search the old files and Del for the deletion of files. My problem is ...