View Single Post
Old 12-03-2016, 05:09 PM   #43
Giuseppe Chillem
Groupie
Giuseppe Chillem doesn't litterGiuseppe Chillem doesn't litter
 
Giuseppe Chillem's Avatar
 
Posts: 178
Karma: 134
Join Date: May 2010
Device: IREX DR1000
Unhappy

Hi Terisa,
there is a bug in your code.

Consider the following filename:

2008 - Handbook of Motivation Science - Shah, James & Gardner, Wendy L. (eds)-[Guilford].pdf

It is imported as:

filename: 2008 - Handbook of Motivation Science - Shah, James & Gardner, Wendy L
Extension: (eds)-[Guilford]

This other filename:

2009 - Building Motivational Interviewing Skills - David B. Rosengren.pdf

It is imported as:

filename: 2009 - Building Motivational Interviewing Skills - David B
extension: Rosengren

You are probably searching for the first DOT from the start of the filename, while you should search for the first DOT from the end of filename... or you are using a wrong regular expression.

Also, I see that the original extension as been truncated, so you are using some kind of code were you drop everything there is in the filename after the second dot and the second dot too...

I suppose today I have lost a lot of information while importing +3000 books
(261 book with wrong/partial information which I already have deleted )

Last edited by Giuseppe Chillem; 12-03-2016 at 08:25 PM.
Giuseppe Chillem is offline   Reply With Quote