1.

Solve : Replace the particular string using Dos batch program?

Answer»

Hi,

I have text file ( fulllist.txt ) with following format contents

C:\PROGRAM Files\Nero\Nero 9\Templates\Smart3D\Menus\4_3\Cube\cube.mpg
C:\Program Files\Nero\Nero 9\Templates\Smart3D\Menus\4_3\Cube\cube_intro.mpg
-----
-----
-----
C:\Program Files\Nero\Nero 9\Templates\Smart3D\Menus\4_3\Cube\cube_intro.mpg
D:\Program Files\Nero\Nero 9\Templates\Smart3D\Menus\4_3\Cube\cube.mpg
D:\Program Files\Nero\Nero 9\Templates\Smart3D\Menus\4_3\Cube\cube_intro.mpg
-----
-----
-----
D:\Program Files\Nero\Nero 9\Templates\Smart3D\Menus\4_3\Cube\cube_intro.mpg


i want REPLACE "C:\" with "\\Server\" and  "D:\" with "\\Server\"

how to WRITE a batch file to open my file "Fulllist.txt" and replace the above string ?



Kindly help me..
Code: [Select]for /F "delims=" %%A in (fulllist.txt) do echo \\Server\%%~pnxA Quote from: Salmon Trout on October 24, 2010, 05:20:26 AM

Code: [Select]for /f "delims=" %%A in (fulllist.txt) do echo \\Server\%%~pnxA

Thanks!

i want redirect  the results new file..

Quote from: csselva on October 24, 2010, 05:41:33 AM
i want redirect  the results new file..

I am sure you know how to do that.





Discussion

No Comment Found