1.

Solve : Delete Files After X Days?

Answer»

I understand this has been covered a lot but i SEEM to be running into a brick wall each time i try this. What I would like to do is:

1.  remove files (IMAGES) that are x days old. (modified)  "e:\path\path"
2.  skip all conformation boxes like "are you sure"

I'm running windows server 2008, is there any automated programs out there like Easy Batch Builder? Or whats my solution.

Thanks, 
Code: [SELECT]Forfiles -P e:\path\path -s -m *.* -d -14 -c "cmd /c del /q path
this seems to work in XP and Windows 7 but not in Windows Server 2008so i got it  on my own 

helps if you have the path right. Quote from: bolson7117 on FEBRUARY 26, 2010, 10:08:36 AM

Code: [Select]Forfiles -p e:\path\path -s -m *.* -d -14 -c "cmd /c del /q path
this seems to work in XP and Windows 7 but not in Windows Server 2008

My I ask......
How to delete the files that is one year old......
Well what i mean is, I want to delete the files that is one year old.
Where to change the script?
Is it the "-14" ?Try that. There may also be a -y switch, so you could try -y 1


Discussion

No Comment Found