|
#1
|
|||
|
|||
Your particular situation is a bit difficult to deal with (and I apologize for not reading your previous posts more clearly).
Because the macro you are using (PROCFILES_FULLPATH) uses other macros, and contains the [ and ] symbols, you need to first expand the macro using Application.ExpandMacros() [in script so it doesn't interpret the [ ] symbols as framing additional script]. The xml below defines a modified version of the Replace in File step you provided, with a vbld_StepStarting script step that does this conversion (by placing the value into a temp macro for use by the step). Note: simply copy the xml fragment below and paste into Visual Build Pro to review/use the step changes. <step action='Replace in File' type='0'> <FileIn>%_PROCFILES_FULLPATH%</FileIn> <FileOut>%_PROCFILES_FULLPATH%</FileOut> <Find>^ALTER\s+VIEW</Find> <Replace>CREATE VIEW</Replace> <description>Changes ALTER VIEW statements to CREATE VIEW statements</description> <indent type='3'>2</indent> <name>Make ALTER into CREATE</name> <script><![CDATA[ Function vbld_StepStarting() Application.Macros(vbldMacroTemporary).Add "_PROCFILES_FULLPATH", EscapeString(Application.ExpandMacros("%PROCFILES_ FULLPATH%")) End Function ]]></script> </step> |
|
|