During the course of a batch file, a path like the following is stored in temp.txt
:
c:\folder1\folder2\.
The period at the end is just because the path is generated from a for /r %%a in (.)
statement. I try to get rid of this using the world famous jrepl.bat search and replace batch file, escaping the backslash with a double-backslash:
type temp.txt|jrepl "\\." "" >temp2.txt
Only problem is that this produces strange results because the search string is interpreted as a regular expression instead of a literal string. So then I tried this as instructed by the jrepl documentation:
type temp.txt|jrepl "\\." "" /l >temp2.txt
...but then for some reason nothing changes. The trailing \.
at the end of the URL unfortunately remains intact. I have no idea what I'm doing wrong...