Home > Software engineering >  RemoveDirectory failure problem, a great god give directions
RemoveDirectory failure problem, a great god give directions

Time:11-01

Folder is open, the recursive method under RemoveDirectory failure last error: 145 (183 directory is not empty) cannot create (existing),
The key is recursive, folder files have been deleted, made a mistake when Remove the outer layer of the folder, don't understand,


As long as don't open the folder will be fine,

End, I think is the easiest way to how to decide to delete the folder is open ? Prompt the user to turn off the folder first, to avoid this problem
(maybe this method is not fundamentally solve the problem)


Ask god to reassure

CodePudding user response:

What is the matter folder is open? Refers to the Windows explorer (explorer. Exe) of a window to open the folder?
After the test, this kind of situation is can use RemoveDirectory delete

CodePudding user response:

reference 1st floor CharlesSimonyi response:
folder is open is what circumstance? Refers to the Windows explorer (explorer. Exe) of a window to open the file?
After testing, this kind of circumstance can use RemoveDirectory delete


Well yes, open it exploer
Can be deleted, but I an error occurred when this situation happens to be open, don't open is no problem,
All of a sudden I can't find out reason, don't know why
So want to determine whether the folder is through explorer to open,

CodePudding user response:

Use the command line call opened_files_view:
http://www.nirsoft.net/utils/opened_files_view.html

CodePudding user response:

File search handle to be closed

CodePudding user response:

reference zhao4zhong1 reply: 3/f
using the command line call opened_files_view:
http://www.nirsoft.net/utils/opened_files_view.html

This view is open file

CodePudding user response:

Upstairs positive solution, the file handle to be closed,
  • Related