File.Exists not working.

  • Thread starter Thread starter George Lake
  • Start date Start date
G

George Lake

Now this is strange.
I had an app runing on W2K Pro and now that its on XP I cant find a file.

The code that is not working is:
If File.Exists("O:\DTX Import UMAR\AsTester.txt") Then



Where "O:\DTX Import UMAR\AsTester.txt" is a network path.

Any ideas why this is not working?
 
George Lake said:
I had an app runing on W2K Pro and now that its on XP I cant find a file.

The code that is not working is:
If File.Exists("O:\DTX Import UMAR\AsTester.txt") Then

Where "O:\DTX Import UMAR\AsTester.txt" is a network path.

Any ideas why this is not working?

Documentation:

| *Return Value*
| 'true' if the caller has the required permissions and 'path'
| contains the name of an existing file; otherwise, 'false'. This
| method also returns 'false' if 'path' is a null reference
| ('Nothing' in Visual Basic) or a zero-length string. If the
| caller does not have sufficient permissions to read the specified
| file, no exception is thrown and the method returns 'false'
| regardless of the existence of 'path'.
 
mmm
It should work then. The application is running under the same user as the
old server.
mmmm
 
What user? If it is "system", then XP won't let the network IO succeed.
This is one of the security changes from W2K to XP.

Mike Ober.
 
yes to both.
what beats me is that the same app runing under the same user works on win2k
Pro and not on XP pro
 
Back
Top