Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:89c5a9.png@16bbe87c.45bc247a]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of scrumbus@...
Sent: Thursday, January 02, 2014 5:09 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: E9: Dealing with temp files on server
I have a batch file schedule to run each night to remove files at various age intervals, the -d says how many days old the file has to be before deleting. I used to scan user directories too as in old versions of 9 and 8 they weren't being cleaned up either properly.
Not sure how clean this batch file is going to look, but I'll paste it in. Remove the user specific file section if you don't want to scan them.
:: Will scan the directory and delete any file older than XX days
:: The xx being whatever value comes after the -d flag
:: Clear General EpicorData files generated by the server
forfiles -p "C:\Epicor\EpicorData" -d -15 -m Assign* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -1 -m baq* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m bfc* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m bpm* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m BusEntity* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m COAL* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -7 -m DBI* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m GLBCOA* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m GLJrn* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -7 -m lbi* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -5 -m rcd* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m RestrictFcts* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m srt* -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData" -d -15 -m trp* -c "Cmd /c del Echo @Path"
:: Clear User Specific files that linger by user
forfiles -p "C:\Epicor\EpicorData\Reports" /s -d -90 -m *.xml -c "Cmd /c del Echo @Path"
forfiles -p "C:\Epicor\EpicorData\Reports" /s -d -90 -m *.txt -c "Cmd /c del Echo @Path"
:: Clear User Specific bat files that linger by user
forfiles -p "C:\Epicor\EpicorData\Reports" /s -d -15 -m *.bat -c "Cmd /c del Echo @Path"
[Non-text portions of this message have been removed]