Renaming Filenames with 2 extensions
I have a need to upload 2 copies of a image.... one 100 X 75 (small) and one 600 X 400 somethin (large) with 2 inner extensions to differentiate
The upload works fine.... What I want to do is name one " black_lab.small.jpg " and then name the other one " black_lab.large.jpg "
I can do this fine up until I encounter that same filename a 2nd time. WHen the script renames the duplicate filename with a _1 via "[NewFileName]_[Increment]"
the name comes out as " black_lab.small_1.jpg
I have tried the following
"[NewFileName]_[Increment]".small
"[NewFileName]_[Increment].small"
"[NewFileName]_[Increment]".".small"
I have even tried putting it like this:
'FileName' => "[FileName].small",
'FileName' => "[FileName]".".small",
plus a few others....
I have tried multiple ways and they all some out with the _[increment] on the outside, not the inside...
So how Can I get the filenames to be
example_3.small.jpg and not example.small_1.jpg
Thanks ahead for your help....