How to escape trailing backslash in NVelocity

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-05-12T15:04:58Z Indexed on 2010/05/12 18:54 UTC
Read the original article Hit count: 560

Filed under:
|
|

I am using NVelocity to process various PowerShell scripts before they are executed against a server.

My question is how to escape a backslash trailing a variable:

e.g.

ls \\$computername\c$

$computername should be replaced with a valid computer name at runtime, but the trailing backslash (\c$) means that it does not.

Thanks Ben

© Stack Overflow or respective owner

Related posts about nvelocity

Related posts about velocity