Hi
I'm trying to run AFR through the command line in an MS-DOS batch file so that I can run two sets of AFR with different configuration files. However, it seems that only the config file that I last ran through Windows AFR is being executed. I have even tried to copy the relevant config file to default.cfg but this makes no difference.
rem first file
copy C:\Progra~1\Advanc~1\file1.cfg default.cfg
C:\Progra~1\Advanc~1\afr -execute:replace -exit -min
rem second file
copy C:\Progra~1\Advanc~1\file2.cfg default.cfg
C:\Progra~1\Advanc~1\afr -execute:replace -exit -min
Thanks
Command Line: multiple runs of AFR
Did you read command line parameters topic?
http://www.abacre.com/afr/manual/commandline.htm
So try this:
C:\Progra~1\Advanc~1\afr -config C:\Progra~1\Advanc~1\file1.cfg -execute:replace -exit -min
C:\Progra~1\Advanc~1\afr -config C:\Progra~1\Advanc~1\file2.cfg -execute:replace -exit -min
Does it work?
http://www.abacre.com/afr/manual/commandline.htm
So try this:
C:\Progra~1\Advanc~1\afr -config C:\Progra~1\Advanc~1\file1.cfg -execute:replace -exit -min
C:\Progra~1\Advanc~1\afr -config C:\Progra~1\Advanc~1\file2.cfg -execute:replace -exit -min
Does it work?
Command Line: multiple runs of AFR
Hi Roman
Thank you very much for your prompt reply and helping me to solve my problem.
The AFR program works fine through the command line. The error was mine: I was using the long filenames ( -config c:\program files\advanced find and replace\file1.cfg) when specifying the config file rather than the 8-character DOS format ( -config c:\Progra~1\Advanc~1\file1.cfg) filenames, as shown in your example.
My DOS batch file works wonderfully now!
Kind Regards
BC
Thank you very much for your prompt reply and helping me to solve my problem.
The AFR program works fine through the command line. The error was mine: I was using the long filenames ( -config c:\program files\advanced find and replace\file1.cfg) when specifying the config file rather than the 8-character DOS format ( -config c:\Progra~1\Advanc~1\file1.cfg) filenames, as shown in your example.
My DOS batch file works wonderfully now!
Kind Regards
BC
Re: Command Line: multiple runs of AFR
BC wrote:The AFR program works fine through the command line. The error was mine: I was using the long filenames ( -config c:\program files\advanced find and replace\file1.cfg)
When you asked the question I thought about this variant.
The truth is that you can use long file names: just double quote them!
For example:
-config "c:\program files\advanced find and replace\file1.cfg"