Guest Hugo Posted October 26, 2007 Posted October 26, 2007 Hi everyone ! What tool can I use to delete files older than a specified number of days (on command line)? Thank you ! Hugo
Guest Pegasus \(MVP\) Posted October 26, 2007 Posted October 26, 2007 Re: delete files older than... "Hugo" <newschrg@noemail.noemail> wrote in message news:OzoXlK9FIHA.6068@TK2MSFTNGP05.phx.gbl... > Hi everyone ! > > What tool can I use to delete files older than a specified number of days > (on command line)? > > Thank you ! > > Hugo > xxcopy.exe, using the /db and the /L switches.
Guest Lanwench [MVP - Exchange] Posted October 26, 2007 Posted October 26, 2007 Re: delete files older than... Hugo <newschrg@noemail.noemail> wrote: > Hi everyone ! > > What tool can I use to delete files older than a specified number of > days (on command line)? > > Thank you ! > > Hugo another option- Forfiles -p "<path>" -s -m *.* -d -10 -c "Cmd /C del @FILE" (all files older than 10 days)
Guest Pegasus \(MVP\) Posted October 26, 2007 Posted October 26, 2007 Re: delete files older than... "Lanwench [MVP - Exchange]" <lanwench@heybuddy.donotsendme.unsolicitedmailatyahoo.com> wrote in message news:%231em4z%23FIHA.3548@TK2MSFTNGP06.phx.gbl... > Hugo <newschrg@noemail.noemail> wrote: >> Hi everyone ! >> >> What tool can I use to delete files older than a specified number of >> days (on command line)? >> >> Thank you ! >> >> Hugo > > another option- > > Forfiles -p "<path>" -s -m *.* -d -10 -c "Cmd /C del @FILE" > > (all files older than 10 days) Congratulations! You must be one of a very small group of people able to make sense of the syntax rules of the forfiles.exe command. :-)
Guest Lanwench [MVP - Exchange] Posted October 26, 2007 Posted October 26, 2007 Re: delete files older than... Pegasus (MVP) <I.can@fly.com> wrote: > "Lanwench [MVP - Exchange]" > <lanwench@heybuddy.donotsendme.unsolicitedmailatyahoo.com> wrote in > message news:%231em4z%23FIHA.3548@TK2MSFTNGP06.phx.gbl... >> Hugo <newschrg@noemail.noemail> wrote: >>> Hi everyone ! >>> >>> What tool can I use to delete files older than a specified number of >>> days (on command line)? >>> >>> Thank you ! >>> >>> Hugo >> >> another option- >> >> Forfiles -p "<path>" -s -m *.* -d -10 -c "Cmd /C del @FILE" >> >> (all files older than 10 days) > > Congratulations! You must be one of a very small group > of people able to make sense of the syntax rules of the > forfiles.exe command. :-) Make sense of 'em? Sure, the important ones. I know a lot of really smart people and I often steal^H^H^H borrow batch files from them for my own use. I can generally figure out what the parameters do once I see them working - but this isn't my area. I'm just a magpie, and the world is full of shiny objects. ;-)
Guest Ken Zhao [MSFT] Posted October 29, 2007 Posted October 29, 2007 Re: delete files older than... Hello Hugo, Thank you for using newsgroup and thanks Pegasus and Lanwench's great information sharing with us. Thanks & Regards, Ken Zhao Microsoft Online Support Microsoft Global Technical Support Center Get Secure! - http://www.microsoft.com/security <http://www.microsoft.com/security> ==================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ==================================================== This posting is provided "AS IS" with no warranties, and confers no rights.
Guest Hugo Posted October 30, 2007 Posted October 30, 2007 Re: delete files older than... Thank you ! Forfiles do a great job ! Hugo "Lanwench [MVP - Exchange]" <lanwench@heybuddy.donotsendme.unsolicitedmailatyahoo.com> a écrit dans le message de news: %231em4z%23FIHA.3548@TK2MSFTNGP06.phx.gbl... > Hugo <newschrg@noemail.noemail> wrote: >> Hi everyone ! >> >> What tool can I use to delete files older than a specified number of >> days (on command line)? >> >> Thank you ! >> >> Hugo > > another option- > > Forfiles -p "<path>" -s -m *.* -d -10 -c "Cmd /C del @FILE" > > (all files older than 10 days) >
Guest Lang Du Posted December 4, 2007 Posted December 4, 2007 Re: delete files older than... I am using Window XP pro. How could I get forfiles command ? Where should I download it ? Thank you.
Guest David Brown Posted December 5, 2007 Posted December 5, 2007 Re: delete files older than... Hello Lang, Never heard of forfiles, but a quick search shows that it's part of the MS 2000 resource kit. You can download the reskit here: http://www.petri.co.il/download_free_reskit_tools.htm It's amazing what you can do in two minutes with Google. > I am using Window XP pro. How could I get forfiles command ? Where > should I > download it ? > Thank you.
Guest Lang Du Posted December 6, 2007 Posted December 6, 2007 Re: delete files older than... Thank David, It works. However, I found a link http://technet2.microsoft.com/windowsserver/en/library/9660fea1-65c7-48cf-b466-204ba159381e1033.mspx?mfr=true which has different syntax with yours. Do you have any idea ? Why I cannot find any forfiles.exe downloads from MS web server ? Thank you. "David Brown" wrote: > Hello Lang, > > Never heard of forfiles, but a quick search shows that it's part of the MS > 2000 resource kit. > > You can download the reskit here: > http://www.petri.co.il/download_free_reskit_tools.htm > > It's amazing what you can do in two minutes with Google. > > > > > I am using Window XP pro. How could I get forfiles command ? Where > > should I > > download it ? > > Thank you. > >
Guest David Brown Posted December 11, 2007 Posted December 11, 2007 Re: delete files older than... Hello Lang, Not sure. I didn't find one at MS either. Maybe it's old enough to be unsupported and they've offloaded or abandoned it, or it's quietly being killed. That may be another reason to learn to use Robocopy or the "/f" option of the "FOR" command built into DOS. > Thank David, > > It works. However, I found a link > > http://technet2.microsoft.com/windowsserver/en/library/9660fea1-65c7-4 > 8cf-b466-204ba159381e1033.mspx?mfr=true > > which has different syntax with yours. Do you have any idea ? Why I > cannot > > find any forfiles.exe downloads from MS web server ? > > Thank you. > > "David Brown" wrote: > >> Hello Lang, >> >> Never heard of forfiles, but a quick search shows that it's part of >> the MS 2000 resource kit. >> >> You can download the reskit here: >> http://www.petri.co.il/download_free_reskit_tools.htm >> It's amazing what you can do in two minutes with Google. >> >>> I am using Window XP pro. How could I get forfiles command ? Where >>> should I >>> download it ? >>> Thank you.
Guest Sarah Lou Posted September 27, 2008 Posted September 27, 2008 Re: delete files older than... 'Lanwench [MVP - Exchange Wrote: > ;3257196']Hugo <newschrg@noemail.noemail> wrote: > > Hi everyone ! > > > > What tool can I use to delete files older than a specified number of > > days (on command line)? > > > > Thank you ! > > > > Hugo > > another option- > > Forfiles -p "<path>" -s -m *.* -d -10 -c "Cmd /C del @FILE" > > (all files older than 10 days) I found a really helpful post on using forfiles and all the switches here: http://www.jjclements.co.uk/index.php/2008/07/31/delete-files-older-than-certain-number-of-days Could be worth checking out I think -- Sarah Lou ------------------------------------------------------------------------ Sarah Lou's Profile: http://forums.techarena.in/members/sarah-lou.htm View this thread: http://forums.techarena.in/windows-server-help/839803.htm http://forums.techarena.in
Recommended Posts