I have a variable containing a path like this


And I want to turn it into something like


I tried like this

set SLASH=/

and a number of other ways, but the slash just doesn't appear


I did

C:\> set ABC=a\b\c
C:\> set DEF=/%ABC%


C:\> set SLASH=/
C:\> set GHI=%SLASH%%ABC:\=/%

on my Windows 7 system, and I got %DEF% = /a\b\c and %GHI% = /a/b/c.  You might get more help if you describe your system, what you want to happen, what you are doing, and what is happening.  "the slash just doesn't appear" isn't very much to go on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.