Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python shutil.move->;WindowsError:[Error32]进程无法访问该文件_Python - Fatal编程技术网

Python shutil.move->;WindowsError:[Error32]进程无法访问该文件

Python shutil.move->;WindowsError:[Error32]进程无法访问该文件,python,Python,我使用Python2.5。和舒蒂尔有问题 print(srcFile) print(dstFile) shutil.move(srcFile, dstFile) 输出: c:\docume~1\aaa\locals~1\temp\3\tmpnw-sgp D:\dirtest\d\c\test.txt ... WindowsError: [Error32] The process cannot access the file because it is being used by anot

我使用Python2.5。和舒蒂尔有问题

print(srcFile)
print(dstFile)
shutil.move(srcFile, dstFile)
输出:

c:\docume~1\aaa\locals~1\temp\3\tmpnw-sgp
D:\dirtest\d\c\test.txt
...
WindowsError: [Error32] The process cannot access the file because it is being used by 
  another process: 'c:\\docume~1\\aaa\\locals~1\\temp\\3\\tmpnw-sgp'
我在Windows2003服务器上使用它

那么,这里怎么了?有人知道吗


致以最诚挚的问候。

如果要继续使用脚本,请使用:

try:
    shutil.move(srcFile, dstFile)
except WindowsError:
    pass

获取错误32的原因是计算机或服务器上有另一个进程正在使用该文件。您可能不想复制临时文件,因为它们的名称并不重要。

如果您想继续使用脚本,请使用:

try:
    shutil.move(srcFile, dstFile)
except WindowsError:
    pass
获取错误32的原因是计算机或服务器上有另一个进程正在使用该文件。您可能不想复制临时文件,因为它们的名称并不重要