DEL oldfiles
Moderator: DosItHelp
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: DEL oldfiles
That's what the forfiles command is for.
See https://stackoverflow.com/questions/510 ... han-n-days for more examples.
Code: Select all
forfiles /p "C:\what\ever" /s /m *.* /D -<number of days> /C "cmd /c del @path"
Re: DEL oldfiles
Ah so that the reason why no del attribute for for a specific date of file to be deleted. Any way to make forfiles faster?ShadowThief wrote: ↑13 Feb 2023 00:36That's what the forfiles command is for.See https://stackoverflow.com/questions/510 ... han-n-days for more examples.Code: Select all
forfiles /p "C:\what\ever" /s /m *.* /D -<number of days> /C "cmd /c del @path"
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: DEL oldfiles
Delete fewer files?
Re: DEL oldfiles
Thank you so much for the forfiles command that you share but is their a way or other command or attribute to make the deletion faster I am deleting multiple folders a lot of time and they are sized up to 60 GB or more aside from doing it manually any other way forfiles is fast for individual items but with folders containing multiple files with the large size the delete process took more than overnight for I have tested this.xiro wrote: ↑13 Feb 2023 03:09Ah so that the reason why no del attribute for a specific date of file to be deleted. Any way to make forfiles faster?ShadowThief wrote: ↑13 Feb 2023 00:36That's what the forfiles command is for.See https://stackoverflow.com/questions/510 ... han-n-days for more examples.Code: Select all
forfiles /p "C:\what\ever" /s /m *.* /D -<number of days> /C "cmd /c del @path"
I hope anyone here tried another alternative
Re: DEL oldfiles
Need to delete it on bulk so the next day the external hdd is available for another set of backup
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: DEL oldfiles
Would it be faster to move all the files that are younger than 3 days old somewhere else and then delete the folders entirely?
Barring that, BestBuy is currently selling 18 TB external hard drives for $290, which is cheaper than they're usually going for. It may be worth upgrading your storage so that you have more time to let the command run.
Barring that, BestBuy is currently selling 18 TB external hard drives for $290, which is cheaper than they're usually going for. It may be worth upgrading your storage so that you have more time to let the command run.
Re: DEL oldfiles
if move that's robocopy right with the attribute /maxage:3 right? I prefer to delete so I was really looking for an option or workaround for this but thank for your suggestions anywayShadowThief wrote: ↑13 Feb 2023 21:22Would it be faster to move all the files that are younger than 3 days old somewhere else and then delete the folders entirely?
Barring that, BestBuy is currently selling 18 TB external hard drives for $290, which is cheaper than they're usually going for. It may be worth upgrading your storage so that you have more time to let the command run.
Re: DEL oldfiles
This is one of those situations where I would use the unix like tools found in Cygwin. There is an excellent discussion of this exact topic "How to find and delete files older than specific days in unix?" at
https://unix.stackexchange.com/question ... ys-in-unix
https://unix.stackexchange.com/question ... ys-in-unix
Re: DEL oldfiles
How about using Everything?
It will probably allow for filtering of files based on some regular expression or some inner feature which could be saved thus accessed with just ~3 clicks later on
And on top of an AutoHotkey file would serve as a script doing this automatically - and also make it run one way or another on system startup
It will probably allow for filtering of files based on some regular expression or some inner feature which could be saved thus accessed with just ~3 clicks later on
And on top of an AutoHotkey file would serve as a script doing this automatically - and also make it run one way or another on system startup
Re: DEL oldfiles
There's a utility called byenow from the dev of Bvckup that is faster (some bechmarks of byenow/del/rmdir/robocopy appear on the page). May want to test it.
Edit: forgot it takes directories as inputs only.
Edit: forgot it takes directories as inputs only.