===============================
General
===============================
Code examples for batch files
1. Batch file to delete files older than X days.
===============================
1. Batch file to delete files older than X days.
===============================
The batch file is under D:\working_dir\scripts
#ECHO OFF
ECHO Start Delete files older than 30 days under D:\working_dir\old_files
cd D:\working_dir\old_files
forfiles /p "D:\working_dir\old_files" /s /d -30 /c "cmd /c del @file"
ECHO Files Deleted
cd D:\working_dir\scripts
No comments:
Post a Comment