Link to home
Start Free TrialLog in
Avatar of rich brown
rich brown

asked on

Directory.Exists(C# DotNet) returns true, but actually, the path is not existing in explorer windows.

Directory.Exists(C# DotNet) returns true, but actually, the path is not existing in explorer windows. However, when I type in the unc or change directory using DOS command the directory appears.  Although "Directory.Exists" find the directory, it does not copy the directory. It only copies folders and files shown in explorer. I assume these folders\files were deleted but somehow is being seen by "Directory.Exists". How can I get "Directory.Exists" to ignore these folders\files? Also, if these are not deleted files, please explain why they are not shown in explorer. If they are deleted files that still exist on my computer, will they cause performance issues with the filesystem? Could this cause a directory search to take longer?
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There is another possibility.  Are you looking in the 'users' or some other special path.  (This is often happening in non english language versions of windows).  You see a path in windows explorer but that is only for display, the real path on disc is something different.  This plays havoc if you don't understand and attempt to put a path together yourself without handling this redirection.

Can you give an example of one of these 'fake' paths you experience.