Pythonを使用できるので、バッチファイルの代わりにPythonプログラムを使用することをお勧めします。おそらく、次のようなものです。
#!/usr/bin/python
import shutil
import sys
import re
for path in sys.argv[1:]:
print "processing " + path
infile = open(path,'r')
tmpfile = open(path+'.tmp','w')
# make the replacements
for line in infile:
line = re.sub("/footer.js","/footer_ungrad.js",line)
line = re.sub("/header.js","/header_ungrad.js",line)
line = re.sub("/sample.js","/sample_ungrad.js",line)
tmpfile.write(line)
infile.close()
tmpfile.close()
# now move it back to the original file
shutil.move(path+'.tmp',path)
Python2.4でテスト済み。