Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-04-2005, 09:45 AM
rollbackfs rollbackfs is online now
Registered User
 
Join Date: 01-04-2005
Posts: 4
Replace In File Problem

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
Attached Files
File Type: zip stringreplace.zip (342 Bytes, 1593 views)
Reply With Quote
  #2  
Old 01-04-2005, 09:57 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
  #3  
Old 01-04-2005, 10:13 AM
rollbackfs rollbackfs is online now
Registered User
 
Join Date: 01-04-2005
Posts: 4
Yep, that did it!! Thanks!!!!
Reply With Quote
  #4  
Old 01-04-2005, 12:45 PM
rollbackfs rollbackfs is online now
Registered User
 
Join Date: 01-04-2005
Posts: 4
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/showthre...hlight=replace and that works for regular text, however for unicode it doesn't. Any help is appreciated.

Thanks
Reply With Quote
  #5  
Old 01-04-2005, 02:52 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The attached sample works as expected here, replacing

PRODUCT_VERSION=<any text>

with

PRODUCT_VERSION=20.00.0010

in a Unicode text file.
Attached Files
File Type: bld repl.bld (794 Bytes, 1606 views)
Reply With Quote
  #6  
Old 01-04-2005, 02:56 PM
rollbackfs rollbackfs is online now
Registered User
 
Join Date: 01-04-2005
Posts: 4
awsome. Thank you very much!!!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 11:25 PM.


Copyright © 1999-2023 Kinook Software, Inc.