安装文件夹上的Python shutil.copy2 SameFileError

时间:2018-06-22 16:37:19

标签: python-3.x mount shutil

我在将cifs挂载到Windows文件系统的Linux系统上。我想在Linux系统上使用程序,将文件移动到挂载的子文件夹中。

#Python 3.6
import shutil
src = '/mnt/shares/top/0) Input/filename.htm'
dest = '/mnt/shares/top/2) Processed/filename.htm'
shutil.copy2(src,dest)

我得到一个例外:

shutil.SameFileError: '/mnt/shares/top/0) Input/filename.htm' and '/mnt/shares/top/2) Processed/filename.htm' are the same file

0 个答案:

没有答案
相关问题