Perhaps it would be wiser to move the files to a Trash folder rather than to delete them altogether.You can achieve this by selecting script from nautilus context menu. I can't tell what script you are referring to, but this one will do just fine.
So, create the script, make it executable and place it in the nautilus script folder.
files_del=$(echo "$comm_susbst" | sed -n 'n;p')
num_files=$(echo "$files_del" | wc -l)
zenity --question --title="Delete every second file" \
--text="Are you sure you want to delete these files? \n You will delete $num_files files! \n\n $files_del"
if [ $? == 0 ]; then
echo "$files_del" | while read; do mv -t /home/$USER/.local/share/Trash/files "$REPLY"; sleep 0.1; done
else exit 1
After selecting files and running a script zenity window will pop-up for confirmation.If you insist on deleting files than replace the
mv line with
do rm -f "$REPLY". I hope it works as you imagine it will :)