View Single Post
Old 12-04-2016, 03:12 PM   #46
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,211
Karma: 11766195
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by Giuseppe Chillem View Post
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 )
Yes, you're right about the mistake, sorry.
Terisa de morgan is offline   Reply With Quote