regarding batch scripting

Score
0
Vote Up
February 26, 2010 at 02:00:29 Pacific
Specs: Windows XP

I have around 160 batch files in a folder,there is a small change in the scripts. i have to replace a command in each and every script.i want to replace TOUCH command with type nul>. how can i. otherwise i have to go manually

Reply ↓  Report •


#1
Vote Down
Score
0
Vote Up
April 29, 2010 at 17:14:37 Pacific

I would suggest using a powerful text editor like Textpad. You can load all files into Textpad, and do a global search and replace.

Reply ↓  Report •

#2
Vote Down
Score
0
Vote Up
May 1, 2010 at 03:53:22 Pacific

Something like this (untested), but you need sed.exe :

FOR %%f in (*.*) do (
sed.exe "s/old_text/new_text/g" %%f > %%f.new
move /Y %%f.new %%f
)


Reply ↓  Report •

Reply to Message Icon Start New Discussion
Related Posts

« Recall a Batch Array Usin... programing c++ »

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.

Ask the Community!
Describe your Problem
Example: Hard Drive Not Detected on My PC