#!/bin/sh
# 移动选择的文件或者目录到指定目录中（可多个一起移动）
#fpoint于2009年11月12日
DESTINO=$(zenity --title "要移动到哪里去？－fpoint" --file-selection --directory)
	
for FileOrDir 
do
	if [ -f "$DESTINO/$FileOrDir" ]; 	   then
		if 
		zenity --question --text="文件‘$FileOrDir’已经存在，是否覆盖？" --title "重复提醒"
		then
			mv  "$FileOrDir" "$DESTINO"
		fi
	elif [ -d "$DESTINO/$FileOrDir" ];	then
		if 
		zenity --question --text="目录‘$FileOrDir’已经存在，是否覆盖？" --title "重复提醒"
		then
			mv "$FileOrDir" "$DESTINO"
		fi
	else
		mv "$FileOrDir" "$DESTINO"
	fi
done
