# Solved: DOS - Replace string value in Environment variable



## trusp (Dec 5, 2008)

Hi 

I created the DOS based batch file as below:

set STR_PATH=%1
........
........

I am passing the argument as C:\TestDir\Test to the batch file

So here in a period of time I need the STR_PATH value to be replaced as C:/TestDir/Test.
Is there any way to replace '\' with '/' in DOS.

So present value is : STR_PATH=C:\TestDir\Test
Required value is : STR_PATH=C:/TestDir/Test

Please help me out in this issue asap.

Trusp


----------



## TheOutcaste (Aug 8, 2007)

Check out *set /?*, section on Environment variable substitution, about the 2nd screen of the help file.

Jerry


----------

