convert only a few files via script

Hi everyone,

is it possible to convert a list of fit files from a directory like I can do from the gui? As far as I know, the “convert” command converts all the files of a directory, but I only want to convert a particular list.

Regards

if you want only the FITS files from a directory, use the link command instead of convert.

I saw that command, but it is not what I’m looking for. I want to convert a set of fits files, not all of them. Thanks for the reply anyway!

siril doesn’t have a command that does what you want, use a shell script to copy or link the files you want in a new directory and use siril from there

That is exactly what I’m doing. I just wanted to be sure that such command does not exist. Thanks for confirming!

Sure, simple bash file will do the job. If you call this one “convfits” and call it on the commandline followed by a list of files (dragged from a filemanager selection or typed):

#!/bin/bash
for i in "$@";do
    FILE_NO_EXT=${i%.*}
    convert -quality 98 $i $FILE_NO_EXT.jpg
done