Environment versions
Network:
Windows 2003 Server
>>Just guessing - but what is the total length of the full path to the file. Could that exceed 260 ?
>
>It gives 82 characters from the path + 160 at the file name. Up to that, it works. This is a total of 242. However, from the application, it is run under a share name. And, in that situation, yes, it would then fall over 260. So, that explains.
>
>But, I found that weird that once a hook as been establish to the file object that it will not run because of the path.
>
>Thanks
Interesting. And there's a way this can happen even without the share name: Although the OS won't let you copy a file into a folder if the combined length is too long there's nothing to prevent someone extending the length of the folder name *after* the file has been added.....
And you were right - the FileInfo returned for such a file is odd.
Length, as you found, throws a FileNotFound exception.
Name seems to work.
LastAccessTime doesn't throw an exception - but seems to return garbage....
Also, FWIW trying to open such an 'overlength' file in Notepad, for example, gives 'Access is denied'
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only