How can I make downloaded files older than 3 days automatically delete with Windows?

July 4, 2013
Pinterest Stumbleupon Whatsapp

I have a folder where I dump a daily backup of my website and another one for my downloads. I want to set up a rule for both folders so files older than 3 days are automatically deleted to save space. I am using Windows 7 64-bit.

How do I accomplish this?

Ads by Google

  1. Don
    July 16, 2013 at 9:11 pm

    Try this, I use this one and it works fine for me.
    http://www.themisteriosos.com/delete-files-automatically-with-auto-delete.htm

    • Lisa Santika O
      July 19, 2013 at 8:18 am

      See my answer to Bruce. Thanks!

  2. Oron J
    July 5, 2013 at 12:52 pm

    I'd approach it with one of the tools suggested by Bruce & Hovsep. Although it would be nice to get it done on the cloud, I can't find suitable options on IFTTT to make this happen.

    • Lisa Santika O
      July 5, 2013 at 8:13 pm

      Yeah. It'd be great if it could be done without having to download the files into my machine first. Waste a lot of precious quota. Thank you for everyone's help.

  3. Hovsep A
    July 5, 2013 at 8:34 am

    FORFILES.exe (Native command in Vista/Windows7/2008, via Resource Kit for XP)
    http://ss64.com/nt/forfiles.html
    http://technet.microsoft.com/en-us/library/cc753551(v=ws.10).aspx
    download from here
    ForFiles - delete old files, etc.
    http://winhlp.com/node/180

    Cyber-D's Autodelete
    http://cyber-d.blogspot.fr/2005/10/cyber-ds-auto-delete-101.html

    Robobasket
    http://www.robobasket.com/auto-delete-old-files.html

  4. Bruce E
    July 5, 2013 at 3:01 am

    You could create a PowerShell cmdlet to perform the job and then set it up as a sheduled task.

    Or you could download the GNUWin 'find' utility and set up a schedule task to delete the files. The syntax would be 'find C:backup -type f -mtime +3 -delete'. This will search through the C:backup directory for all regular files older than 72 hours from the current time and delete them. If you want to use midnight as a date boundary, you need to add the '-daystart' modifier before the -mtime option.

    • Lisa Santika O
      July 5, 2013 at 8:59 am

      Thanks, Bruce, but someone butchered up my question. I was asking for how to auto-clean files older than 3 days in Dropbox, not Windows. Do you happen to know about that?

    • Bruce E
      July 5, 2013 at 9:25 am

      Dropbox creates a local folder on your machine when you install it. You can just alter the command to run against that folder (or any particular subfolder). For example, 'find "C:UsersLisaDropboxSite Backup" -type f -mtime +3 -delete' will delete files older than 3 days in the Site Backup subfolder of your local Dropbox folder. The diretory to work on is quoted because of the space in the 'Site Backup' subfolder name. The '-type f' means to only delete files; any subdirectories in the starting folder will not be deleted no matter how old they are.

      The changes that this command makes (the file deletions) will be synced by the Dropbox tool at the next opportunity it has.

    • Lisa Santika O
      July 5, 2013 at 8:14 pm

      Thanks Bruce. That's the best way I've found. I hoped for cloud-based solutions so I don't have to download the backups to my machine first, but for now such method doesn't exist.

Ads by Google