How do I delete files in Windows older than 30 days?

How do I delete files in Windows older than 30 days?

To delete files older that X days, do the following.

  1. Open a new command prompt instance.
  2. Type the following command: ForFiles /p “C:\My Folder” /s /d -30 /c “cmd /c del @file” Substitute the folder path and the amount of days with desired values and you are done.

How do I clean up Windows old files?

How to Delete the Windows. old Folder

  1. Go to the Windows search bar.
  2. Type Cleanup.
  3. Launch the Disk Cleanup app.
  4. Click the “Clean up system files” button.
  5. If you have multiple drives, select the (C:)
  6. Check the box for “Previous Windows Installation(s).”
  7. Click OK to delete.

How to delete files older than 30 days from Recycle Bin?

Automatically Delete Files Older Than 30 Days From Recycle Bin In Windows 10. On a PC running Windows 10, when you delete a file by choosing a file and hitting the Delete key, or right-clicking on file and then clicking Delete option, the file is moved to the Recycle Bin so that you can restore the deleted file to its original location at any time.

How to delete files older than X days automatically on Windows 10?

How to use ForFiles to delete files older than X days on Windows 10. If you have different folders with a lot of files and you would like to cleanup by deleting those files that are older than certain days, you can use these steps: Open Start. Search for Command Prompt, right-click the result and select Run as administrator.

How to stop Storage Sense from automatically emptying your Recycle Bin?

To stop Storage Sense from automatically deleting files in your Recycle Bin, click the “Delete files in my recycle bin if they have been there for over” box under Temporary Files and select “Never.” By default, Storage Sense will delete files that have been in your Recycle Bin for over 30 days.

How can I limit the size of my Recycle Bin?

Click Save Settings to continue. If you selected the ‘Periodically on the background’ option, it will let you select the number of days after which it will delete files in it. You can also limit the recycle bin by size i.e. it should not be bigger than a certain percentage of your Windows drive, or you can limit its size in MB.