Replacing/removing ! in a batch file (with answer)
Posted: Wed Jun 27, 2018 9:38 pm
I needed to remove exclamations marks from file names. After reading an answer somewhere on this forum, it appears that exclamations (as well as ampersands &) need to be escaped with ^.
Unfortunately the batch processor grabs the caret, so the answer is to use 2 of them, like so:
I hope this saves someone somewhere from frustration.
Unfortunately the batch processor grabs the caret, so the answer is to use 2 of them, like so:
- Code: Select all
BRC32 /PATTERN:* /REPLACECI:^^!:CharlieXCX /EXECUTE
I hope this saves someone somewhere from frustration.