#1 2016-03-14 05:56

KenK
Member
Registered: 2013-04-28
Posts: 6

Creating standard file name format from existing non-standard names

Hello All,

I have several hundred file names that were created by different users who chose not to follow the standard format (in terms of dates, as well as names) we had in place.

Some various examples are as follows:

2015-09-18 FileName #496 MiscText
2015-12-11#508 FileName
#659, 11-01-2016, FileName

Will it be possible to use ReNamer to take these inconsistent file names and create a specific standard file name which maintains the same naming consistency?

For instance, I would like all the above file names to become:

#496 - 2015-SEP-18 - FileName - MiscText
#508 - 2015-DEC-11 - FileName - MiscText
#659 - 2016-JAN-10 - FileName - MiscText

And, certainly, I don't need to modify all the files at once.  It would not be a problem to run the program a few times using different rules if that's simpler.  I just don't understand what to do to change the order of the existing file names to create the new, correct file name.

Thank you,

Ken

Offline

#2 2016-03-14 12:21

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: Creating standard file name format from existing non-standard names

Hello Ken,

The are many different ways (combinations of rules) how this can be accomplished, depending on variations of original file names and output requirements.

To get you started, take the following rules:

1) Reformat Date: Convert to "yyyy-mmm-dd - " from "yyyy-mm-dd", "dd-mm-yyyy", whole words only, skip extension
2) RegEx: Replace expression "\A(.*?)(#\d+)(.*)\Z" with "$2 - $1 $3" (skip extension)
3) CleanUp: Replace with spaces ",", Normalize spaces, Fix spaces (skip extension)

Input names:

2015-09-18 FileName #496 MiscText
2015-12-11#508 FileName
#659, 11-01-2016, FileName

Output names:

#496 - 2015-Sep-18 - FileName MiscText
#508 - 2015-Dec-11 - FileName
#659 - 2016-Jan-11 - FileName

Offline

Board footer

Powered by FluxBB