Removing Angle Brackets

Advanced Renamer forum
#1 : 03/10-15 00:51
Posts: 3
I'm using <File Line> to rename a bunch of files but the lines that I want to use to name the files have angle brackets some of the time and of course that gives an error because it's invalid for a file name.

The problem is that I can't seem to escape them out. I've managed to remove any doubles using this (<.*>) with regular expressions and Remove Pattern (what's between the two in these cases is always noise, so I'm happy to delete the whole thing) but I haven't been able to get any variations on this expression working to delete angle brackets when they appear solo.

Example (new) file name:

"Change XY --> YZ.txt"

The only way I have found to get rid of the ">" is to replace everything between XY and YZ. Which means a new method for every instance where I have a stray angle bracket. It would be really nice to have one method that would get rid of them all within a file set.

Anybody know how to escape angle brackets?

03/10-15 00:51
#2 : 04/10-15 11:34
Posts: 92
Reply to #1:

It looks like the program does not like < or > in the pattern, which is a bit strange because (<.*>) does seem to work although it does not without the optional parentheses, i.e. <.*> only.

Even with just a standard text remove (i.e. not using regular expressions), it does not like the > sign.

E.g. a few tests...
remove '--' work, giving "Change XY > YZ.txt"
but remove '>' does not give "Change XY -- YZ.txt"

My feeling is that the < and > are reserved characters to indicate a tag (e.g. <File Line>).

Using the regular expressions option, you should be able to escape any character using \, but this does not work in AR for this method.

04/10-15 11:34