Epicor 9 work file deletion

My experience has been that actual reports (.txt and .xml files) are
deleted properly (in 8.03.405 and .408B). But other work files (such as
MRP log files, etc.) are ignored.

I wrote a similar batch file using 'forfiles' to do the same thing.

-bws

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of dyoderbx
Sent: Thursday, November 04, 2010 4:54 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Epicor 9 work file deletion

Epicor 9 does not delete it's work files the way that Vantage did. So,
I have found a way to delete those files on a regular basis.

It does not honor the "Archive Period" on the Epicor report request
screen, but then neither does Epicor as far as I can tell.

This command works only on Server 2003 and on up.

FORFILES /p G:\Epicordata /m *.* /d -4 /c "CMD /C del @file"
this command will delete system work files found in the directory
g:\EpicorData that are over 4 days old.

If you add a /s parameter to this, it will search and delete from all
subdirectories. So the following command:
FORFILES /p G:\Epicordata\Reports /s /m *.* /d -34 /c "CMD /C del @file"
will delete the user files that are over 34 days old, assuming all the
users have subdirectories in the G:\EpicorData\Reports directory like my
setup.

You can go to a command prompt, and type in FORFILES /? to get a list of
all the parameters to get additional ideas of how to use this command.

Please test thoroughly on your system by using the echo command instead
of the del command in my example. Echo will show the file names that
match your criteria and that will be deleted when you put the del
command back in.



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder
and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
Epicor 9 does not delete it's work files the way that Vantage did. So, I have found a way to delete those files on a regular basis.

It does not honor the "Archive Period" on the Epicor report request screen, but then neither does Epicor as far as I can tell.

This command works only on Server 2003 and on up.

FORFILES /p G:\Epicordata /m *.* /d -4 /c "CMD /C del @file"
this command will delete system work files found in the directory g:\EpicorData that are over 4 days old.

If you add a /s parameter to this, it will search and delete from all subdirectories. So the following command:
FORFILES /p G:\Epicordata\Reports /s /m *.* /d -34 /c "CMD /C del @file"
will delete the user files that are over 34 days old, assuming all the users have subdirectories in the G:\EpicorData\Reports directory like my setup.

You can go to a command prompt, and type in FORFILES /? to get a list of all the parameters to get additional ideas of how to use this command.

Please test thoroughly on your system by using the echo command instead of the del command in my example. Echo will show the file names that match your criteria and that will be deleted when you put the del command back in.