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
I would suggest using a powerful text editor like Textpad. You can load all files into Textpad, and do a global search and replace.
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
)
| « Recall a Batch Array Usin... | programing c++ » |