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 09-20-2011, 09:53 AM
Rogier Rogier is online now
Registered User
 
Join Date: 09-09-2004
Location: the Netherlands
Posts: 40
Replace in File: disabling vbscript parser for search / replace expressions?

I want to replace some string within file A with the contents of another file B, using the "Replace in File" step.

To do so, I've entered this as the 'replace' contents:

Quote:
[vbld_FSO.OpenTextFile("FileB").ReadAll]
Problem: when file B (which is to be inserted into A) contains stuff between square brackets [like this], I'm getting random "invalid expression" errors - apparently the vbscript parser interprets the result of the above expression as well. I've already enabled "Tread all characters as literals (no regexp)", that didn't solve it.

Is there a way to literally get a file's contents as search or replace pattern, and have VBP use that without parsing that content for vbscript? And I guess same goes for stuff %between percentage marks% because that would be interpreted as a macro.

Basically I'm looking for a way to insert a file "binary", without any parsing whatsoever. Suggestions?
Reply With Quote
  #2  
Old 09-20-2011, 12:16 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
See the vbld_GetFileContents system script function or vbld_EscapeString.
http://www.kinook.com/VisBuildPro/Ma...scriptfile.htm
http://www.kinook.com/VisBuildPro/Ma...scriptmisc.htm
Reply With Quote
  #3  
Old 09-20-2011, 03:22 PM
Rogier Rogier is online now
Registered User
 
Join Date: 09-09-2004
Location: the Netherlands
Posts: 40
Excellent, thanks!
Reply With Quote
Reply

Tags
binary , parse , read file , replace , vbscript


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 07:26 PM.


Copyright © 1999-2023 Kinook Software, Inc.