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. In this case, you can delete old movie files automatically by using the 'Task Scheduler' and 'ForFiles' commands on windows.



To delete old videos automatically, please follow the steps below:

  1. Click on Start, type in "Scheduler," and click "Task Scheduler."

    Start Windows task scheduler

  2. [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

  3. [Triggers] tab: Choose "Daily" to delete old files every day.

    How to delete old videos automatically, Image 3

  4. [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

  1. You cannot restore the files from the Recycle Bin when using the "ForFiles" command.
  2. 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


Related Tips

1. How to record your PC for 24 hours & 365 days

Computer recording 24 hours a day, 365 days a year

If you use the "Around mouse" recording mode and Windows Task Scheduler, you can automatically record your computer screen when Windows starts, without the recorder status bar. This function allows you to do PC Monitoring or Surveillance.


2. How to prevent users from deleting recorded videos

How to prevent users from deleting recorded videos

To prevent standard users from deleting videos, such as while recording company computers, you should enable [Recording] and disable [Deleting].


3. How to safely store recorded videos on a network computer

How to prevent users from deleting recorded videos

Security-critical institutions such as banks or insurance companies may want to record and store each employee's computer screen on a central computer over a network.


4. How to automatically backup videos to another HDD or Google Drive

How to automatically backup video files

You can automatically move recorded files to another HDD or Google Drive using the "Robocopy" command and Windows Task Scheduler.