How do I delete files from my age?

How do I delete files from my age?

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 delete a 1 year old file in Linux?

  1. find /path/to/files -type f -mtime +365 -delete would be easier. –
  2. -delete isn’t in my aix find so I’m not accustomed to using it.
  3. find … –
  4. Also, it’s a good idea to use — in case the first file name begins with a – (although you can guarantee it won’t happen if the directory passed to find doesn’t begin with a – ). –

How can I delete files older than 30 days?

To find and delete files older than certain number of days using ForFiles, open a Command Prompt window, and type one of the following commands: The above assumes that the folder path is D:My Scripts and you want to delete files older than 30 days. Customize the folder path and number of days according to your needs.

How can I delete older files in PowerShell?

To specify a date range, select the first date and drag the cursor to the appropriate field. If you wish to delete older files automatically rather than doing a search query every time, you need to create a batch file or PowerShell.

Is there a program to delete old spooled files?

Rochester Support Center knowledgebase document New contains source code for an IBM RPG/400 program called DLTOLDSPLF (Delete Old Spooled Files) that deletes any spooled files older than a specific target date.

How to delete files with last modified date?

/d to select files with a last modified date. -365 simply means a year ago. /c to indicate the command to execute each file found in the search. The command string needs to be wrapped up in double quotes. “cmd /c echo @file” is the default command if not specified.