DOS - Replace Environment variable

Ms / Ms/e6550
January 27, 2009 at 23:05:53
Specs: DOS, Intel DUO
Hi

I created the DOS based batch file as below:

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

I am passing the argument as C:\TestDir\Test

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


See More: DOS - Replace Environment variable

Report •


#1
January 28, 2009 at 00:03:56
DOS? No.

Command Prompt? Yes.


Report •

#2
January 28, 2009 at 02:09:07
yes .. Batch File

Report •

#3
January 28, 2009 at 02:21:04
set STR_PATH=%STR_PATH:\=/%

Report •

Related Solutions

#4
January 28, 2009 at 02:58:10
Thanks IVO. Its working fine.

Report •

#5
January 28, 2009 at 08:41:43
In DOS

set STR_PATH=C:/TestDir/Test


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#6
January 28, 2009 at 20:55:30
Yes Mechanix2Go

I need that environment variable to be set like that.
Thanks


Report •


Ask Question