#!/usr/bin/env python
#-*- encoding:utf-8 -*-
import os,os.path
def file_rename(dir_name,file_name,des_name):
os.chdir(dir_name)
print '当前目录是:',os.getcwd()
if os.path.exists(des_name):
os.remove(des_name)
else:
os.rename(file_name,des_name)
dir_name=raw_input('please input change file destnation dir:')
file_name=raw_input('please input file source name:')
des_name=raw_input('please input dest file name:')
file_rename(dir_name,file_name,des_name)