首先獲得工作路徑
import osworkpath = wd()
拼接獲取和的絕對路徑
src = (wd(), ')dst = (wd(), ')
使用rename函數
try: me(src, dst)except Exception as e: print(e) print('rename file failrn')else: print('rename file successrn')