1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Support' started by Charles G, Apr 10, 2015.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,022
    Likes Received:
    0
    for %fn in ("*&*") ren /n "*&*" "%@replace[&,_,%fn]"

    Does not seem to work. Any suggestions?

    Would a modification to FixNames plugin be a good idea?
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    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.
     
  3. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,022
    Likes Received:
    0
    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 -
     

Share This Page