DEL oldfiles
Posted: 12 Feb 2023 19:16
Code: Select all
forfiles /p "C:\what\ever" /s /m *.* /D -<number of days> /C "cmd /c del @path"
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"
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"
Need to delete it on bulk so the next day the external hdd is available for another set of backup
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.