Hi
I am trying to convert a large number of JPG files into PNG. For this purpose I tried "for" loop as follows:
Code:
for i in *.jpg;do convert $i $i.png;done
This commands works fine for all files, except for those which contains spaces in their names. For example, if a file is named as "my picture.jpg", then "convert" or any other utility gives following error:
Quote:
convert: unable to open image 'my': No such file or directory
convert: unable to open image 'picture.jpg': No such file or directory
|
So, what change I should make in this "for" loop to accommodate files with space character in their names?
Thanks