|You can do this alot easier i think . I do the same process with Monarch but I do it with consistent file names. so for example I move the original file to a working folder and so I start with a : |
copy w:\medical records\tri data\$$A2OLB1_0313_0000.TXT w:\medical records\tri data\working\A20LB.txt
*****I do this so that monarch has a consistent file name to look for on the automation. *******
******Then you automate*********
"C:\Program Files\Monarch\Program\MONARCH.EXE" "w:\medical records\tri data\working\A20LB.txt" "w:\medical records\tri data\A2OLBA4.xmod" /T "w:\medical records\tri data\A20LB.aca"
I almost forgot put this at the very top of your batch file.
for /F "tokens=1-4 delims=/- " %%A in ('date/T') do set DATE=%%B%%C%%D
for /F "tokens=1-4 delims=/- " %%A in ('date/T') do set TODAY=%%B%%C
that will allow you to set a date function to your batch file.
Now after your monarch export line you can then change that report w:\medical records\tri data\A20LB.aca to the correct file name with the correct date.
copy "w:\medical records\tri data\A20LB.aca" "w:\medical records\tri data\%DATE%.aca"
or you could do
copy "w:\medical records\tri data\A20LB.aca" "w:\medical records\tri data\%DATE%.txt"
or both for that matter. I believe it should keep the correct structure.
On the above statements you can name it %today%OR %DATE% depending the stucture you want i use both ways so i have to have 2 names on my script.
Now on the FTP side you'll probably want to follow the instructions above. I don't do any of that.
if you have any more questions just let me know. i am still trying to figure out how to give monarch the functionality of putting the worksheet name as the current date and nobody seems to have an answer for that.