#! /bin/bash messaggio() { zenity --info --text="$1" } conto=0 htmlout=0 fullpath=0 nomelista=`zenity --title "File name" --entry --text "Name of list file"` htmlout=$(zenity --question --title "Output in html?" --text "Output in html?") htmlout=`echo $?` if [ "$htmlout" == "0" ]; then fullpath=1 else fullpath=$(zenity --question --title "Insert full path?" --text "List files with full path?") fullpath=`echo $?` fi if [ "$htmlout" == "0" ]; then nome2="$nomelista.htm" htm1="listaLista dei file
dimensione in byte

" htm9_a="" htm11="
" htm9_ab="
" htm9="" #htm9="" #htm10="
" htm10="
" htm10_b="
" iniziohtm=$htm1$htm2$htm3$htm4$htm5$htm6$htm7$htm8 tuttifile="" due=2 for file in $NAUTILUS_SCRIPT_SELECTED_URIS; do let conto+=1 base="`echo $file | cut -d'/' -f3- | sed 's/%20/ /g'`" png_file="`echo $base | sed 's/\.\w*$/.png/'`" file2=`basename "$file"` #htm9 file2 htm10 #tuttifile+=$htm9$file2$htm10 DIMENSIONE=$(stat -c%s $file2) let "resto = $conto % 2" if [ "$resto" -eq 0 ] then tuttifile+=$htm9_a else tuttifile+=$htm9_ab fi tuttifile+=$conto tuttifile+=$htm9 tuttifile+=$file2 tuttifile+=$htm10 tuttifile+=$DIMENSIONE tuttifile+=$htm10_b #tuttifile+=$file2 done #`echo $iniziohtm >> $nomehtm` nuova=$iniziohtm$tuttifile$htm11 #htm11 `echo $nuova >> $nome2` messaggio "Created html file ($nome2) with $conto files list." else if [ "$fullpath" == "0" ]; then for file in $NAUTILUS_SCRIPT_SELECTED_URIS; do let conto+=1 `echo $file >> $nomelista` done messaggio "Created ($nomelista) file list with full path, ($conto files)" else for file in $NAUTILUS_SCRIPT_SELECTED_URIS; do let conto+=1 file2=`basename "$file"` `echo $file2 >> $nomelista` done messaggio "Created ($nomelista) file list, ($conto files)" fi fi