@teslas_moustache I believe that I got this script, or one quite similar, from -
#!/bin/bash
numberArgs=$#
OUTPUT=$(zenity --file-selection --directory --title="Choose your target directory")
if [ "$?" -eq 1 ]; then
zenity --error --text="Cancelled"
# --auto-close
exit 1
fi
TARGETDIR=$(awk -F, '{print $1}' <<<$OUTPUT)
for (( i=1; i<=$numberArgs; i++ )); do
echo "# ${1##*/}"
cp -r --preserve=all "${1}" "$TARGETDIR/"
rm -r "${1}"
echo "$(( (i * 100)/$numberArgs ))"
sleep 0.5
shift 1
done | zenity --progress --title="Copy files to $TARGETDIR" --percentage=0
# --auto-close
if [ "$?" -eq 1 ]; then
zenity --error --text="Cancelled!"
# --auto-close
exit 1
fi
Perhaps this will suit you.