#coding=gbk
import os
import sys
import shutil
DIRNAME = "E:\\Program Files\\ArcGis\\"#目錄名稱
TARGET = "C:\\"#移動文件的目標目錄
ISFILE = "file.txt"
if os.path.isfile(DIRNAME+ISFILE):
try:
i = raw_input("Move file %s ? [Y/N] " %ISFILE)
if 'y'==i.lower():
shutil.move(DIRNAME+ISFILE,TARGET+ISFILE)
elif 'n'==i.lower():
pass
else:
print "Please input 'Y' or 'N'"
except KeyboardInterrupt:# catch CTRL-C
print "exit!"
sys.exit(1)
else:
print "File %s%s doesn't exists !" %(DIRNAME+ISFILE)