Hi all,
I have the following command:
mogrify -format jpg -path thumbs -thumbnail 200x150 ./1080p/*.jpg
which is: "transform into jpg thumbnails all the jpgs found in 1080p directory and put them into thumbs directory"
Is there a way to save the output files in lowercase?
eg P1090612.JPG to p1090612.jpg
thank you in advance
save files to lowercase in Windows
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: save files to lowercase in Windows
You can rename them:
Code: Select all
ren P1090612.jpg p1090612.jpg
snibgo's IM pages: im.snibgo.com
Re: save files to lowercase in Windows
thank you, but finally I made it in php:
I thought there is some command in ImageMagic to convert to lowercase the output files.
Code: Select all
$directory="D:/photos/thumbs";
echo '<h3>Scanning folder '.$directory.'</h3>';
$files = scandir($directory);
foreach($files as $key=>$name){
if ($name[0]!='.'){ // not . or ..
$oldName = $name;
$newName = strtolower($name);
echo '<h4>oldName='.$oldName.' -> newName='.$newName;
if ($oldName===$newName)
echo ' -> same';
else {
rename("$directory/$oldName","$directory/$newName");
echo ' -> renamed!';
}
echo '</h4>';
}
}
Re: save files to lowercase in Windows
and also in the case of multiple filessnibgo wrote:You can rename them:Code: Select all
ren P1090612.jpg p1090612.jpg
Code: Select all
for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f")