whats the easiest way of converting all backslashes to forward in a path in a batch file, since I need to use bash for execution.
SET "string=D:\path\to\folder"
ECHO %string:\=/%
Basically, you need first to store the string value into an environment variable, then use the following template:
%variable:str1=str2%
to replace every occurrence of str1
in variable
with str2
.
You can always remind yourself about this pattern by invoking SET /?
from the command prompt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With