Solved Batch file, find and insert a character

October 21, 2012 at 21:45:49
Specs: Windows XP
Hi...
How can I find a character and insert that character to string

if I pass a line "c:\dir1\dir2\dir3" to the batch file to find "\" then it should insert to "c:\\dir1\\dir2\\dir3"

Can anyone help me?


See More: Batch file, find and insert a character

Report •


#1
October 22, 2012 at 03:12:33
✔ Best Answer
:: ===== script starts here ===============
::
:: marklee.bat 2012-10-22 15:50:43.60
@echo off > newfile & setLocal enableDELAYedeXpansioN

set S=%1
set S=!S:\=\\!
echo !S!
::====== script ends here =================


====================================
Life is too important to be taken seriously.

M2


Report •

#2
October 22, 2012 at 04:09:40
@Mechanix2Go
it very good.
Thank you very much

Report •

Related Solutions


Ask Question