Removing last numbers in filenames

Advanced Renamer forum
#1 : 06/04-14 00:22
Antonio
Antonio
Posts: 1
Hi

I am a loyal user of the software, but this time I need to do something different and I am stuck with this for days and really don´t know how to do it.

I have hundreds of video files named that way:

videofilename657.avi
anothervideofilename6987.avi
onemorevideofilename59.avi

Basically video file name + a secuence of random numbers of 2,3 or 4 digits.

How can I delete these ending random numbers and keep only the original video file name?


Thanks in advance for any tip!


06/04-14 00:22
#2 : 06/04-14 13:31
Stefan
Stefan
Posts: 274
Reply to #1:


If you do really want to remove EVERY digit from the whole file name,


why not utilize Remove pattern method?
(http://www.advancedrenamer.com/user_guide/metho d_removepattern)


1.) Remove pattern: 1

2.) Remove pattern: 2

...) Remove pattern: ...

9.) Remove pattern: 9

10.) Remove pattern: 0

----------------------------------------------------

Or much better:

If you want to replace more than one pattern, you can separate the different phrases with \

1.) Remove Pattern: 1\2\3\4\5\6\7\8\9\0


----------------------------------------------------

Or more simply:

1.) Remove Pattern: \d
[X] RegEx


http://www.advancedrenamer.com/user_guide/regul ar_expresions

----------------------------------------------------

.


06/04-14 13:31
#3 : 06/04-14 15:14
Stefan
Stefan
Posts: 274
Reply to #2:


For all the others, who really want to remove every LAST, trailing digits,

from for example

12 Mile Road, 2003 TV-Movie 1234.ext
7 Days to Live, 2000 US,German3456.ext
13 Cold Blooded Eagles, 1992 Hong Kong 1234.ext
Devil At 4 O'Clock124.ext
101 DALMATIANS 234.ext
2 FAST 2 FURIOUS7734.ext
AMERICAN PIE 5 THE NAKED MILE7685.ext


would better utilize the Replace method
(http://www.advancedrenamer.com/user_guide/metho d_replace)

with regular expressions.


Find: ^(.+?)\s?\d*$
Replace: \1
[X] RegEx


Explanation:
^ --- match at begin of string
(.+?) --- one-or-more of any sign, non-greedy, () group for back referencing
\s? --- until a possible blank is found or not
\d* --- none-ore-more digits are found
$ --- found at the very end of the string

\1 --- replace with what is matched into the (...) group

.


06/04-14 15:14