Python shutil.move->;WindowsError:[Error32]进程无法访问该文件
我使用Python2.5。和舒蒂尔有问题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
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的原因是计算机或服务器上有另一个进程正在使用该文件。您可能不想复制临时文件,因为它们的名称并不重要