I have created a batch file that will rename files, then run a Monarch project file. For some reason, I cannot get the REN command in DOS to work when I run the batch file using AutoScript, but I can get it to work if I run the batch file directly. I get an error message saying the process cannot be started. Alternatively, I can get the command lines that run Monarch to work through Autoscript, but not outside of it.
I have tried the DOS commands REN, RENAME, and COPY, but none work...below is the text of my .bat file:
rem ********Rename Files********
CD C:Program FilesMonarchReportsSAPProcess
REN AH.TXT ASSET_HISTORY.TXT
REM ********Extract Data********
C:Program FilesMonarchProgramMonarch.exe /prj:"C:Program FilesMonarchProjectsAsset History_Extract Asset Class.prj" /pxall
C:Program FilesMonarchProgramMonarch.exe /prj:"C:Program FilesMonarchProjectsAsset History_Extract Eval Group.prj" /pxall
If I put in the full name of the original file in and use the COPY command it works, but not if I use the wildcard symbol (*). Since the name of my file varies from month to month (there is a code and datestamp on it, I need to be able to rename if first.
Am I missing something?