1.

Solve : Delete Files After X Days?

Answer» <html><body><p>I understand this has been covered a lot but i <a href="https://interviewquestions.tuteehub.com/tag/seem-7258342" style="font-weight:bold;" target="_blank" title="Click to know more about SEEM">SEEM</a> to be running into a brick wall each time i try this. What I would like to do is:<br/><br/>1.  remove files (<a href="https://interviewquestions.tuteehub.com/tag/images-238776" style="font-weight:bold;" target="_blank" title="Click to know more about IMAGES">IMAGES</a>) that are x days old. (modified)  "e:\path\path"<br/>2.  skip all conformation boxes like "are you sure"<br/><br/>I'm running windows server 2008, is there any automated programs out there like Easy Batch Builder? Or whats my solution.<br/><br/>Thanks,  <br/> Code: <a>[<a href="https://interviewquestions.tuteehub.com/tag/select-630282" style="font-weight:bold;" target="_blank" title="Click to know more about SELECT">SELECT</a>]</a>Forfiles -<a href="https://interviewquestions.tuteehub.com/tag/p-236832" style="font-weight:bold;" target="_blank" title="Click to know more about P">P</a> e:\path\path -s -m *.* -d -14 -c "cmd /c del /q path<br/>this seems to work in XP and Windows 7 but not in Windows Server 2008so i got it  on my own  <br/><br/>helps if you have the path right. Quote from: bolson7117 on <a href="https://interviewquestions.tuteehub.com/tag/february-460109" style="font-weight:bold;" target="_blank" title="Click to know more about FEBRUARY">FEBRUARY</a> 26, 2010, 10:08:36 AM</p><blockquote> Code: <a>[Select]</a>Forfiles -p e:\path\path -s -m *.* -d -14 -c "cmd /c del /q path<br/>this seems to work in XP and Windows 7 but not in Windows Server 2008<br/></blockquote> <br/>My I ask......<br/>How to delete the files that is one year old......<br/>Well what i mean is, I want to delete the files that is one year old.<br/>Where to change the script?<br/>Is it the "-14" ?Try that. There may also be a -y switch, so you could try -y 1</body></html>


Discussion

No Comment Found