简体   繁体   中英

batch file to delete all files from the folder which are 3 days older

i am using the following command all is fine it deleted the files from the folder i just want to add another condition that the files which are 3 or more days older gets only deleted

pushd "C:\\Bhaskar_Backup\\Mail_BOX" && (rmdir . /s /q & popd )

forfiles -p  "C:\Bhaskar_Backup\Mail_BOX" -s -m *.* -d 3 -c "cmd /c del @path"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM