All pastes #1813172 Raw Edit

clueless

public text v1 · immutable
#1813172 ·published 2010-02-27 09:17 UTC
rendered paste body
# To copy selected files to a location#LOCATION=$(zenity --file-selection --directory --title="Select a directory") || exitLOCATION="./bestof"mkdir -p $LOCATIONIFS=$'\n'for FILENAME in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHSdo    if [ -e "$LOCATION"/"$(basename $FILENAME)" ];then       zenity --question --title="Conflict While Copying" --text="File ""$LOCATION"/"$(basename $FILENAME)"" already exists. Would you like to replace it?"       case "$?" in          1  )  exit 1 ;;          0  )  cp -a -- "$FILENAME" "$LOCATION" ;;       esac    else       cp -a -- "$FILENAME" "$LOCATION"    fidone