Thumbnail generator

Hi Experts!

I have took over of some task in the IT dep and one of the problems I have encountered is the following:

 Running  the BATCH_GenThumb_Antonio.asp I get the following results:

1. Files with the extension:

1.1 lowercase ex: Filename.jpg - the thumbnail file is correctly generated with the name Filename.jpg

1.2 Uppercase (Filename.JPG) - the thumbnail file is generated such as Filename.JPG.jpg

Can someone help me to fix this?

Many thanks,
Antonio
GenThumb.txt
Duke001Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
whats the issue you're trying to fix?
0
Duke001Author Commented:
the generation of the files as as follow:

- Filename01_120.jpg ; Filename01_240.jpg ; Filename01_ORIGINAL.jpg

Not

- Filename01.JPG_120.jpg ; Filename01.JPG_240.jpg ; Filename01.JPG_ORIGINAL.jpg

when the original filename got the extension in Uppercase such as Filename.JPG

Thanks,
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
if I follow correctly, you want the output file names to look like:

Filename01.JPG_120.jpg ; Filename01.JPG_240.jpg ; Filename01.JPG_ORIGINAL.jpg

correct?

the following lines in your MakeThumb function are preventing that from happening:

FileName = replace(FileName,".wmf","")
FileName = replace(Filename,".jpg","")
FileName = replace(Filename,".png","")
FileName = replace(Filename,".gif","")
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Duke001Author Commented:
sorry, its me probably not being clear enough as English is not my mother tongue but what i do not want is the generated files become with ".JPG" or ".PNG" inserted in the middle of the filename and this only happens when the source filenames has the extension in capital letters.
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
no need to apologize, that's why I'm asking :)

try changing:

FileName = replace(FileName,".wmf","")
FileName = replace(Filename,".jpg","")
FileName = replace(Filename,".png","")
FileName = replace(Filename,".gif","")

to

FileName = replace( LCase( FileName ) ,".wmf","")
FileName = replace( LCase (Filename ),".jpg","")
FileName = replace( LCase( Filename ),".png","")
FileName = replace( LCase( Filename ),".gif","")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Duke001Author Commented:
Great stuff!
Thank you very much.
I am going to assigned the points to you now.
0
Duke001Author Commented:
It was quick efficient and professional!
0
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
my pleasure, have a great weekend!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.