Substitute the ack command for the dir command the following:
for /f %i in ('dir /b *.pl') do @perl -i*.bak -pe"s/foo/bar/g" %i
Note the requirement for specifying the extension with the -i switch.
In reply to Re: "ack" and replace in a directory... in Windows?
by BrowserUk
in thread "ack" and replace in a directory... in Windows?
by mascip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |