Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (http://www3.telus.net/pfrank)
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Issues with date formating: Plugin Datereformater

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Haags



Joined: 24 Aug 2011
Posts: 6

PostPosted: Wed Aug 31, 2011 9:27 am    Post subject: Issues with date formating: Plugin Datereformater Reply with quote

Selection before Plugin Datereformater starts ?

The plugin for date formating is very helpful. But, i noticed some formating, which destroys the original “meaning”. Though, i need to identify & filter out these files.

Because i noticed more than one case, i need to define more filter criteria, to avoid a wrong reformat. Instead of using the name filter, where i can only use one filter criteria, is there a option in the search pattern ?

Overall, this date formatting is not easy, due to many potential combinations.
I think, to define one set of regex to cover all cases is not possible. The target probably should be, to find rules for the majority.

I see the need for manual check of the search results, delete out the still correct ones and the push the rename button.

Below, some observations, maybe you have further ideas...

Current setup:

Row 1:
Pre-defined command:
*Convert dates using date formatter in*Prefix*

Options -> Date Formatter: Custom Format %d.%m.%Y

My target:
Format the suitable digits to a european date format e.g. 04.09.2011

My question:
Can i enter in Row 1 to X further filter criteria (instead use name filter), before the Pre-defined date formater row is executed ?


Example cases with wrong results, if i have only row 1:

Problem 1:
Adress 10.06.2010.xls => Adress 06.10.2010.xls

=> this files is correct. Though, i would need to filter out all files with dates in xx.xx.xxxx format

My solution idea:
Use name filter: Exclude all files with 2 dots in prefex with xx.xx.xxxx format:

This name filter is not the perfect one yet. It filters too much.
(.*)(\d{2}[^\.]\d{2}[^\.]\d{4}).*

But, somehow this filter
Is there a possibility, to filter out all files, which have the xx.xx.xxx or xx.xx.xx date format ?


Problem 2:
Development portfolio 2009-2010.pptx => development portfolio 20.10.2009.pptx

How can i filter out these such files, which year range ?

My test in name filter, which did not work:
.*(^2009).*
.* ^(2009-2010).*

Problem 3:
Migration 20.04.09.doc => Migration 00.09.2004.doc

This is a logical problem. How should the system know, which digit position is the year.

My solution idea:
Overall, I should first replace / add the century, if a the last 2 digits are 01, 02, 03, ..10,11
(I do not have files, which are before year 2000) before using the plugin dateformater

Problem 4:
When i enter in name filter .*, then i get this curious result...

360° Solution Review - 20.11.2009.pptx => 360° Solution Review - 20.09.2011.pptx

=> if can filter out the correct files, then plugin would not do such change

Thanks for your help,
Stefan
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 446
Location: Canada

PostPosted: Fri Sep 02, 2011 3:17 am    Post subject: Reply with quote

I'm only going to address problem 1 for now.

In the OPTIONs window there are additional name filter configurations. One of them is an exclusion filter. You should be able to use it to exclude the xx.xx.xx and xx.xx.xxx names as follows:

\d{2}[.]\d{2}[.])(?!\d{2,3}


Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com