R
Richard
Hi all,
this is keeping me awake for the last days. Can someone shed some
light, or point me somewhere else if appropriate?
(Windows XP SP1, Perl v5.8.7 MSWin32-x86-multi-thread)
In a perl script I do this:
$cmd = "convert \"$source\" -resize \"160x160>\"
\"${thumbnail_prefix}${photonr}\"";
print "Command for shell is: ".$cmd."\n";
system ($cmd);
This works fine, as long as ${photonr} does NOT contain any square
brackets.
If ${photonr} turns out to be for example: IMG_8699[1].jpg then the
resulting system command takes an incredible lpng time to complete,
something like 5 to 10 minutes. (it does complete in the end...)
If no [] are present, then all is done in around half a second.
This is printed to the screen and looks ok to me:
Command for shell is: convert "C:\wwwroot\images\Import/104 Weekly Pix
from Supplier/07-090225 Handicraft Fair2/IMG_8699.jpg" -resize
"160x160>" "C:\wwwroot\images\ThumbNails\th_IMG_8699[5].jpg"
The question now is:
Do the [ ] have a special meaning to Perl in this context?
Or should I look for the problem in the way Windows handles the [5] in
the filename?
Or anything else to investigate?
I am sort of stuck.
Some more info:
The target directory has a lot of files, around 200.000
I used File Monitor (Sysinternals) to trace, and see that this
"convert" process is checking LOTS of files but can not find those.
Its mostly looking in the current dir (where the script is). Is this
an indication of anything?
This has been working for over a year, but has never given this
strange behaviour ( as far as I know !!) .
Anyone a hint?
Muchos thanks already,
Richard
this is keeping me awake for the last days. Can someone shed some
light, or point me somewhere else if appropriate?
(Windows XP SP1, Perl v5.8.7 MSWin32-x86-multi-thread)
In a perl script I do this:
$cmd = "convert \"$source\" -resize \"160x160>\"
\"${thumbnail_prefix}${photonr}\"";
print "Command for shell is: ".$cmd."\n";
system ($cmd);
This works fine, as long as ${photonr} does NOT contain any square
brackets.
If ${photonr} turns out to be for example: IMG_8699[1].jpg then the
resulting system command takes an incredible lpng time to complete,
something like 5 to 10 minutes. (it does complete in the end...)
If no [] are present, then all is done in around half a second.
This is printed to the screen and looks ok to me:
Command for shell is: convert "C:\wwwroot\images\Import/104 Weekly Pix
from Supplier/07-090225 Handicraft Fair2/IMG_8699.jpg" -resize
"160x160>" "C:\wwwroot\images\ThumbNails\th_IMG_8699[5].jpg"
The question now is:
Do the [ ] have a special meaning to Perl in this context?
Or should I look for the problem in the way Windows handles the [5] in
the filename?
Or anything else to investigate?
I am sort of stuck.
Some more info:
The target directory has a lot of files, around 200.000
I used File Monitor (Sysinternals) to trace, and see that this
"convert" process is checking LOTS of files but can not find those.
Its mostly looking in the current dir (where the script is). Is this
an indication of anything?
This has been working for over a year, but has never given this
strange behaviour ( as far as I know !!) .
Anyone a hint?
Muchos thanks already,
Richard