Command Line: multiple runs of AFR

General discussions about Advanced Find and Replace
Post Reply
BC
Posts: 2
Joined: Mon Jan 31, 2005 5:32 pm

Command Line: multiple runs of AFR

Post by BC » Mon Jan 31, 2005 5:32 pm

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

Abacre
Site Admin
Posts: 1198
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Mon Jan 31, 2005 5:32 pm

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?
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

BC
Posts: 2
Joined: Mon Jan 31, 2005 5:32 pm

Command Line: multiple runs of AFR

Post by BC » Mon Jan 31, 2005 5:32 pm

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

Abacre
Site Admin
Posts: 1198
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Re: Command Line: multiple runs of AFR

Post by Abacre » Mon Jan 31, 2005 5:32 pm

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"
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Post Reply

Who is online

Users browsing this forum: Steeler [Crawler] and 6 guests