Remove older files in multiple folders
we have older windows 2003 server, hosts iis. delete older iis log files through automated job.
use batch file instead of powershell, because powershell not installed on server. , plan upgrade newer next year.
use following script, see there folders named w3svcxxxx besides w3svc1 . x randoms numbers.
folders, if want delete files in folders, should change in following script, how can use wild card in folder name? tired use w3svc*, not working. save below line in .bat file. thanks
forfiles -p c:\windows\system32\logfiles\w3svc1 -s -m *.log -d -30 -c "cmd /c echo @file"older
use batch file instead of powershell, because powershell not installed on server. , plan upgrade newer next year.
use following script, see there folders named w3svcxxxx besides w3svc1 . x randoms numbers.
folders, if want delete files in folders, should change in following script, how can use wild card in folder name? tired use w3svc*, not working. save below line in .bat file. thanks
forfiles -p c:\windows\system32\logfiles\w3svc1 -s -m *.log -d -30 -c "cmd /c echo @file"older
sqlfriend
i'd ask them on here.
http://social.technet.microsoft.com/forums/en-us/itcg/threads
regards, dave patrick ....
microsoft certified professional
microsoft mvp [windows]
disclaimer: posting provided "as is" no warranties or guarantees , , confers no rights.
Windows Server > Server Manager
Comments
Post a Comment