PDA

View Full Version : Short name possible?


c_by_sinus
6th of May 2004 (Thu), 23:33
Hi all,
I have a simple question, tried to find, but without success so far.
When I have images with long filenames like

2004_04-25_22_12_55-00874-cmam-wintersport-mountains

is there in ee a way to take only a part from filenames, what are then displayed?
Like for example this (part between would be best)

00874

or at least part from start:
2004_04-25_22_12

Thanks for help, if this is not possible, I will use IMatch before uploading ;)
Markus

Pekka
7th of May 2004 (Fri), 16:12
I think if Imatch can do it then please do it with that. This is why:

Often a requested feature is hard to do simply because it is hard to define what is really needed. In your example

2004_04-25_22_12_55-00874-cmam-wintersport-mountains

becomes

00874

This would be coded by making a logic "rule" what part of filename is kept. The rule can be simply "take 5 characters from character position 20). Or we could split the string with _ and - characters and pick the 7th block. If those five characters are not always in position 20 and division characters may not be there then we have to do it with regexp (which I personally hate to do :) ), provided that there are some definable charaters around the area to be cut.

If you can explain the logic it can be coded. In this case it may be hard to describe what is precisely needed. And the more specific you go the less most users need it - and I try to put my time on issues that benefit all.

c_by_sinus
8th of May 2004 (Sat), 05:51
I think if Imatch can do it then please do it with that. This is why:

Often a requested feature is hard to do simply because it is hard to define what is really needed. In your example

2004_04-25_22_12_55-00874-cmam-wintersport-mountains

becomes

00874

This would be coded by making a logic "rule" what part of filename is kept. The rule can be simply "take 5 characters from character position 20). Or we could split the string with _ and - characters and pick the 7th block. If those five characters are not always in position 20 and division characters may not be there then we have to do it with regexp (which I personally hate to do :) ), provided that there are some definable charaters around the area to be cut.

If you can explain the logic it can be coded. In this case it may be hard to describe what is precisely needed. And the more specific you go the less most users need it - and I try to put my time on issues that benefit all.
Hi Pekka,
wise words. I understand this fully and I have no problem, to do it with IMatch before I upload the images. With IMatch I can do almost everything and by the way, the programmer of IMatch, brought me to EE, because he has answered once, if he would use such a "online-system" he would go to EE, because it seemed to him very modern and good coded :D and hence I am here ;)

So this problem is solved, I will do it before uploading, as a benefit this will safe me upload time, because I will use a IMatch-batch with reducing the size of an image and shorten the name.
Thanks for explaining, Pekka
Markus