IOExceptions-文件由"explorer.exe"使用. [英] IOExceptions - file is used by "explorer.exe"
本文介绍了IOExceptions-文件由"explorer.exe"使用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个应用程序,该应用程序必须从用户指定的另一个目录中的应用程序目录中复制文件.
I''m writing an application that has to copy a file from the application directory in another one, specified by the user.
My.Computer.FileSystem.CopyFile(Application.StartupPath + "\latest_version_info.dat", _
My.Settings.DestPath + "\version_info.dat", True)
当我运行它时,我得到一个IOException,该文件已被另一个进程使用.当我杀死"explorer.exe"以查看是否引起问题时,一切正常.
When I run it, I get an IOException that the file was used by another process. When I killed the "explorer.exe" to see if it caused the problem, everything went OK.
Can I somehow copy the file without getting this and wihtout needing to kill the "explorer.exe"?
推荐答案
为什么不尝试使用''另存为''选项而不是复制..
Why don''t you try to use the ''Save As'' option instead of copying..
这篇关于IOExceptions-文件由"explorer.exe"使用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文