arrastrar archivos o carpetas encima
drag N Drop
Code: Select all
#!/bin/bash
# Joe Arose version 1.05
# added to rox right clicks is even better than drag N drop
# this also works from command line an example sana /path/name of file
# so it can clean up and correct a list of files also
# note that permissions are preseved !
#sanitize
#one at a time
rm -f /tmp/tmp/sanitized
rm -f /tmp/borked_name
##special function to clean everything
echo "$@" | tr -d '=;:`"<>,?!@#$%^*&(){}[]' |tr -s ' ' '_*' >/tmp/sanitized
echo "$@" | tr " " "?" | tr '=;:"`<>,!@#$?%^*&(){}[]' '?' >/tmp/borked_name
rename_bork=`cat /tmp/borked_name`
echo "$rename_bork"
for_cleaned=`cat /tmp/sanitized`
echo "$for_cleaned"
mv $rename_bork $for_cleaned
Xdialog --title "Complete" \
--infobox "\nConversion to $for_cleaned has finished.\n" 0 0 2000