且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

该进程无法访问文件'\\ server \ share',因为它正被另一个进程使用。

更新时间:2023-01-31 16:36:54

这意味着您用于文件操作的资源尚未处理。

在您的代码中,在每次文件操作后,尝试处理该对象。



但现在你必须去那个驱动器并检查任务管理器。找到正在运行的进程。

关闭或结束该进程,然后执行代码,它应该可以工作。确保在代码中处理File对象。
That means the resources which you have used for File operation has not yet been disposed.
In your code, after each file operation, try to dispose the object.

But now you have to go that drive and check the Task Manager. Locate your process which is running.
Close that or End that process and then execute your code, it should work. Make sure that you are disposing the File objects in your code.


已解决。实际上我添加新文件的网络路径保存在If Exists目录中。



感谢您的帮助!
Resolved . Actually the network path to which im adding new file is kept in If Exists Directory.

Thanks for the help!