Batch file to replace file contents with

September 8, 2011 at 21:27:01
Specs: Windows XP, Pentiuim 4 2GHz, 2GB
I need a batch file to read all the files in a folder one by one, replace a string in four places with the name of the file (without extension). That string varies from file to file. so it has to be read from the file itself.

There is a file like this: (Filename: destination_name.txt, Folder name : C:\\folder1)
"Testcase name: source_name
Testcase file: source_name.txt
.....third line
........forth line...
i need to replace source_name with destination_name in all places in file.

See More: Batch file to replace file contents with

Report •

September 9, 2011 at 04:14:48
You've shown two lines in which source_name appears, what do the other two look like?

Using C:\\folder1 might indicate that you are working on a network, is this so?

Please confirm that the file is contained within " (double quotes) as shown.

Please come back & tell us if your problem is resolved.

Report •

September 9, 2011 at 04:25:27
The lines in the file are"
Testcase name: source_name - line 1
Testcase file: source_name.txt - line2
Creator: somename - line 3
Date: 12/23/2010 12:21:47 PM - line 4
Folder name: "C:\\folder1" - it could be any folder on the system and not on network.

Report •
Related Solutions

Ask Question