AFR v6.2 command line - quotes

General discussions about Advanced Find and Replace
Post Reply
PDKing
Posts: 3
Joined: Mon Jun 06, 2011 5:46 pm

AFR v6.2 command line - quotes

Post by PDKing » Mon Jun 06, 2011 5:56 pm

AFR v6.2 (trial)
Win7 workstation

How do you search/replace information that has quotes in it using command line to launch AFR?

I have several config files that get updated from the install process and require manuall editting to get the application running correctly. I'm researching the option of building a script (CMD file) to run AFR via command line to make these updates for us. My problem is that I cannot get it to recognize the double quote character from the command line.

I also cannot just run the replace using what is inside the quotes since that data is exsewhere in the config as a tag.

I have tried several variation of the searchfor switch to find binding="customBinding", but when the GUI loads it is only showing binding=customBinding in the Search Query field.

This is the latest command line:
"C:\Program Files\Advanced Find and Replace 6\afr.exe" -mask web.config -path "C:\temp\AFRConfigTest" -execute:find -searchfor binding=""customBinding""

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

Re: AFR v6.2 command line - quotes

Post by Abacre » Thu Jun 09, 2011 5:20 am

Try to use:

"binding="customBinding""

It should work.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

PDKing
Posts: 3
Joined: Mon Jun 06, 2011 5:46 pm

Re: AFR v6.2 command line - quotes

Post by PDKing » Thu Jun 09, 2011 8:17 pm

That got the same result. It doesn't seem to matter how many or where the quote characters are. They are all getting stripped when it loads the GUI (which is causing it to not find any matches).

PDKing
Posts: 3
Joined: Mon Jun 06, 2011 5:46 pm

Re: AFR v6.2 command line - quotes

Post by PDKing » Tue Jun 14, 2011 8:33 pm

I have been able to get around this by using the batch mode instead of individual find/repalce commands I was orriginally thinking. I entered each of my find/replace matches and then saved that as a custom configuration. One note to others going this route is to make sure you have the check boxes for 'Confirm Replacement' and 'Just Find' disabled. After that I was able to call it using this command line.

"C:\Program Files\Advanced Find and Replace 6\afr.exe" -min -mask web.config -path "C:\temp\AFRConfigTest" -execute:batch -config C:\temp\AFRConfigTest\SWSReplace.cfg -exit

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest