How to? Replace &'s in filenames / FixNames.dll

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
This looks better:
Code:
for %fn in ( "*&*" ) ren /n "%fn" "%@replace[^&,_,%fn]"
No, I don't know why it should be necessary to escape the ampersand.

I could add ampersands to FixNames easily enough, but I've never really seen them as a problem. As far as I know, ampersands are okay as long as the filename is quoted.
 
Apr 2, 2011
1,442
10
54
North Carolina, USA
Code:
11/28/2014  18:11         <DIR>    .
11/28/2014  18:11         <DIR>    ..
11/12/2014  14:22          39,424  FixNames-x64.dll
11/12/2014  14:22          34,816  FixNames.dll
11/12/2014  14:26           9,735  fixnames.html

&'s appear in *.URL files mainly...... for me at least...

FixNames v0.27.1 loaded.

How would I change the FOR %fn .... line above to see it work -
 
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly Documentation Replace internal command with LIBRARY command Support 0
I how to make TCC default/replace cmd.exe? Support 9
x13 TPIPE /REPLACE - Remove line (including EOL) Support 3
T @replace -- what is wrong here Support 2
C Replace 1st argument on command line Support 4
R How to? Replace in Rename Support 9
C How to? @replace[a comma,_,filename] Support 5
MickeyF Can't get my TPIPE /replace to work Support 4
C @replace and @xreplace problems Support 5
M I'm unable to use @replace[] with a % character in string2 Support 12
MikeBaas Strange prob with %@replace.. Support 4
vefatica Back-refs in TPIPE's /replace's replacement string? Support 2
Frank @replace works case sensitive Support 5
J @replace weirdness Support 1
vefatica TPIPE /replace? Support 3
Stefano Piccardi replace tcc process space? Support 8
vefatica @SUBST ... how replace character with a caret? Support 9
mdwyer @replace - global use in a text file Support 3
B Regex and Replace Support 6
B REPLACE is good news Support 0
J Problem with %var:find=replace% syntax Support 5
Phileosophos PDIR to list filenames without extensions? Support 2
D How to? Filenames with "&" character Support 3
fpefpe How to? processing filenames Support 6
C Filenames with ";" Support 13
E Fixed DEDUPE doesn't handle filenames with whitespace properly when symlinking Support 1
mikea How to? Problem with @SFN (short filenames) Support 6
A CDD and DOS filenames Support 1
A How to? Work with Filenames Containing Brackets "[" and "]" Support 2
BobK How to? Handling filenames with blanks at command line Support 3
J Fixed Filename completion does not quote filenames containing ^ Support 1
T Square brackets in filenames Support 1
JohnQSmith Filenames with semicolons Support 5
P Support for national letters in filenames in ftp operations Support 1
N Problems with backquotes in filenames Support 17
S Suggestion: enhanced automatic quoting of filenames Support 2
S PDIR has trouble processing filenames with embedded percent sign Support 3
C handling percent signs in filenames Support 2
C handling percent signs in filenames Support 1
B Problems with %-sign in filenames/directory names Support 6
Jay Sage Dealing With Filenames Containing Slash Character Support 5
A Color in filenames in listview Support 1
C @CharlesDye - FixNames DLL Support 1

Similar threads