Luis Diaz
asked on
Windows batch: Generate log file through a cmd command
Hello experts,
I got the following command at: https://pureinfotech.com/delete-files-older-than-days-windows-10/
Very useful to set up directly through windows task scheduler
What I want is to enhance it by generating a log file in a specific folder in order to identify folders deleted.
The idea isn't to have a cumulative log file in order to avoid file increase but just to monitor last excution of the command.
If you have questions, please contact me.
Thank you in advance for your help.
I got the following command at: https://pureinfotech.com/delete-files-older-than-days-windows-10/
Very useful to set up directly through windows task scheduler
ForFiles /p "C:\path\to\folder" /s /d -30 /c "cmd /c del @file"
What I want is to enhance it by generating a log file in a specific folder in order to identify folders deleted.
The idea isn't to have a cumulative log file in order to avoid file increase but just to monitor last excution of the command.
If you have questions, please contact me.
Thank you in advance for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER