PDA

View Full Version : Replace In File Problem


rollbackfs
01-04-2005, 09:45 AM
I'm trying to use a "Replace In File" action to replace a string inside a text file, however VisualBuild doesn't seem able to find the string. In fact, if I choose to append text if no match was found, the text doesnt get appended. Instead I get a couple of rectangular boxes where the text should have been appended.

The file that I'm trying to replace into is the String1033.txt, which is used by an InstallShield installer. I'm trying to modify that file when VisualBuild runs so that the ProductVersion of the installer matches the build version of the rest of my applications.

I'm attaching the file that I'm trying to do the find and replace to, to see if anyone can help.

Thanks

kinook
01-04-2005, 09:57 AM
The text file is in Unicode format; use an Encoding value of 1200 in the Replace in File action. See http://www.visualbuild.com/Manual/?replacetab.htm for more details.

rollbackfs
01-04-2005, 10:13 AM
Yep, that did it!! Thanks!!!!

rollbackfs
01-04-2005, 12:45 PM
Now for my second question....
How can I do a wildcard search inside that Unicode file? What im looking for is where "PRODUCT_VERSION=02.00.0000". I want to take that entire line and replace it with "PRODUCT_VERSION=20.00.0010" (or whatever my build version happens to be).

I looked at http://www.kinook.com/Forum/showthread.php?s=&threadid=557&highlight=replace and that works for regular text, however for unicode it doesn't. Any help is appreciated.

Thanks

kinook
01-04-2005, 02:52 PM
The attached sample works as expected here, replacing

PRODUCT_VERSION=<any text>

with

PRODUCT_VERSION=20.00.0010

in a Unicode text file.

rollbackfs
01-04-2005, 02:56 PM
awsome. Thank you very much!!!!