I'd like to use a user defined action in Xfce for converting pictures.
Therefore i wrote
for i in %F; do filename=$(basename "$i");
extension="${filename##*.}";
filename="${filename%.*}";
convert -resize 1024 $i $filename-1024px.$extension;
done
But this one don't works...whereas when i execute it in a shell (* instead of %F) it's working.
for i in *; do filename=$(basename "$i");
extension="${filename##*.}";
filename="${filename%.*}";
convert -resize 1024 $i $filename-1024px.$extension;
done
I think there is a problem with the storage of the variables?
Edit:
This still works:
for i in %F;
do filename=$(basename "$i");
extension="${filename##*.}";
notify-send "$filename";
done
After change to the following code it stops working:
for i in %F;
do filename=$(basename "$i");
extension="${filename##*.}";
filename="${filename%.*}";
notify-send "$filename";
done