On a windows machine (win 7 or Win server 2008 R2) I have a batch script that copies some .config files to a backup folder.
I want to write another script that deletes the backup files created a week earlier.
There are plenty of suggestions on how to use FORFILES
(as example):
FORFILES /P "D:Configs_Backup" /M *.config /D -7 /C "cmd /c del @file"
But this command uses the "modified" timestamp, while I need to use the creation date.
Without installing any third party program, is it possible via command console to achieve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…