How to automatically delete old video files
If you find yourself frequently recording your computer, you may want to have your old files deleted automatically to avoid going over your hard disk’s capacity limit. In this case, you can delete old movie files automatically by using the 'Task Scheduler' and 'ForFiles' commands of Windows.
To delete old videos automatically, please follow the steps below:
-
Click on Start, type in "Scheduler," and click "Task Scheduler."

-
[General] tab: Click "Create Task...," type in the name of the task such as "Auto delete old files," and choose "Run whether user is logged on or not."
![How to delete old videos automatically, Image 2]()
-
[Triggers] tab: Choose "Daily" to delete old files every day.
![How to delete old videos automatically, Image 3]()
-
[Actions] tab: Click "New..." and enter "ForFiles" to add arguments as shown below:
![How to delete old videos automatically, Image 4]()
- Argument example 1) If the output folder of Bandicam is "C:\Bandicam" and you want to delete files older than 30 days, enter /p "C:\Bandicam" /s /d -30 /c "cmd /c del @file
- Argument example 2) If the output folder of Bandicam is "C:\Users\XXX\Documents\Bandicam" and you want to delete files older than 15 days, enter /p "C:\Users\XXX\Documents\Bandicam" /s /d -15 /c "cmd /c del @file
Once you've completed the steps above, Windows will automatically delete the files in the folder you specified.
Precautions to take when deleting old video files
- You cannot restore the files from the Recycle Bin when using the "ForFiles" command.
- You cannot delete files in a network drive. To delete files in the network drive, run the Notepad (Notepad.exe), enter the following text, and then create a batch file (*.bat). You may execute the *.bat file at a specific time on a daily/weekly schedule using Windows Task Scheduler as shown below.
net use Z: \\Network-folder-path
ForFiles /p "Z:" /s /d -30 /c "cmd /c del @file"
![Delete old files, batch file]()
- You have to enter your network drive instead of Z:
- You have to enter the exact folder path instead of \\Network-folder-path