Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Folder based on Date i.e Older than 60 days

Status
Not open for further replies.

tyant

Programmer
Jun 1, 2001
68
0
0
AU
What to delete the folder & contents based on how old the folder is .... I.e Last modified

Trying to use this command but can't use the /y tag for the Del part of the command in the statement

FORFILES -p C:\Backup\gpo_backups\ -d 100 -c "CMD /C IF @ISDIR==True Del @File"

The statement is for the FORFILES and the DEL is allowed as a one off.

Any help much appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top