This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Escape \ while replacing variables from text file?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 22, 2012
05:42 PM
Escape \ while replacing variables from text file?
I am using the Modify Text File - Single File action and replacing IA variables inside the file.
Some of these variables are folder paths and I want them to comeup with \\ instead of a \
eg:
abcLocation=$USER_MAGIC_FOLDER_4$
if $USER_MAGIC_FOLDER_4$ = c:\abc\def\ghi
I want the file to show,
abcLocation=c:\\abc\\def\\ghi
Is there a way to do this in IA2011?
thanks
Some of these variables are folder paths and I want them to comeup with \\ instead of a \
eg:
abcLocation=$USER_MAGIC_FOLDER_4$
if $USER_MAGIC_FOLDER_4$ = c:\abc\def\ghi
I want the file to show,
abcLocation=c:\\abc\\def\\ghi
Is there a way to do this in IA2011?
thanks
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 23, 2012
02:19 AM
Hi,
There are several ways to do this... read help files for more details about each
- "Modify Text File action" Search & Replace strings: Search for "\" & replace with "\\"
- "Modify String" Plug-in: Convert "$USER_MAGIC_FOLDER_4$" and get $MS_STRING_DBS$ that will contain double backslashes.
- Use custom code action to create your own convert
- ...etc...
--Jerome
There are several ways to do this... read help files for more details about each
- "Modify Text File action" Search & Replace strings: Search for "\" & replace with "\\"
- "Modify String" Plug-in: Convert "$USER_MAGIC_FOLDER_4$" and get $MS_STRING_DBS$ that will contain double backslashes.
- Use custom code action to create your own convert
- ...etc...
--Jerome
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2012
03:21 PM
thanks jerome.
I used the 2nd option from the ones you specified and it works like a charm 🙂
I used the 2nd option from the ones you specified and it works like a charm 🙂