I was looking for a thing like this :
for files in *.jpg
do
echo $files
filesizecurrent=$(wc -c <"$files")
echo $filesizecurrent
if [ $filesizecurrent -ge 100000 ]
then
echo "BIG FILE"
convert $file -resize 1000x1000\> $file
continue
fi
echo "LITTLE FILE"
done
Search found 2 matches
- 2016-10-18T03:57:19-07:00
- Forum: Users
- Topic: Process File only if Dimension Change
- Replies: 3
- Views: 3485
- 2016-10-17T11:06:05-07:00
- Forum: Users
- Topic: Process File only if Dimension Change
- Replies: 3
- Views: 3485
Process File only if Dimension Change
Hello, i have found the command i need, but i need an option more.
for file in *.jpg; do convert $file -resize 1000x1000\> $file; done
I want it not process with file who is not resized, with this command it process with it even if the dimension don't change (but file size change)...
If i do this ...
for file in *.jpg; do convert $file -resize 1000x1000\> $file; done
I want it not process with file who is not resized, with this command it process with it even if the dimension don't change (but file size change)...
If i do this ...