How to remove "-" fron names of MANY files

Advanced Renamer forum
#1 : 03/09-14 02:43
Posts: 1
I used to name files, videos, ecc with the date before the name like 14-09-03 Filename.
In this case 3rd Sept 2014, using - as a separator between the Year-Month-Day.

I want to remove this - from all files (and I have many) and have the date just as 140903.

I am very new to this program. Reading the guide the best bet seemed Trim.

Trim Characters. I put a -
then I click on Start batch, but nothing happens. The file names just remain as they are.

Can someone help me? Where am I going wrong?

Thank you very much.

03/09-14 02:43
#2 : 03/09-14 08:19
Posts: 264
Reply to #1:

14-09-03 Filename.ext
140903 Filename.ext

Trim method d_trim

Please read the help:
"""remove unwanted spaces, dashes, and other unwanted characters from the beginning and end of the filename. """

"""FROM THE BEGINNING AND END""".... not from the middle.


You could use the Remove pattern method d_removepattern

Pattern: -

- - -

14-09-03 File-name - Test.ext
140903 File-name - Test.ext

If you got to have more hyphens than the date delimiter dashes in the file name,
which you want to keep, then you can try the Replace Method d_replace
with this regular expression to remove the hyphen from the date only:

Replace: (\d)-(\d)
With: \1\2
[X]Use regular expressions

This will remove hyphens only if located between two digits without any white space around.

- - -

To make it even more save, to prevent unwanted renaming if there would be still such Digit-Digit pattern anywhere else,
for your provided examples you can use this exactly match of your file name patterns:

<start>DigitDigit-DigitDigit-DigitDigitDigitDigit TheRest.ext<end>

Replace: ^(\d\d)-(\d\d)-(\d\d\d\d)(.+)$
With: \1\2\3\4
[X]Use regular expressions



If this tool had saved you time, perhaps you want to donate an Dollar to Kim?
See >>> [Donate] button.

03/09-14 08:19