Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More on long path
Message
From
01/06/2012 01:54:35
 
 
To
01/06/2012 01:05:06
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01544991
Message ID:
01545020
Views:
31
>>A while back I was doing some work with the Robocopy utility. It supports long fully-qualified file names, apparently up to 32K. ISTR reading some article at the time, that commented that it does this by using APIs that are present and available for NTFS volumes but not commonly used by most file-handling utilities.
>>
>>I can't remember what those APIs are, but if you're working from .Net there seem to be some results if you Google [.net long file name support].
>>
>>If that doesn't work you might be able to use Robocopy itself in a kludgy workaround. Suppose you know the file name you're looking for (could be long), and the folder it's supposed to be in (could be long too). What you could do is:
>>
>>- Create a temp folder somewhere
>>- Use Robocopy to copy the source folder to the temp folder, limiting the file list to just the file name you want (Robocopy is folder-oriented, not file-oriented)
>>- If the file appears in the temp folder, it was present in the source
>>
>>It seems there is even a /L (list) switch for Robocopy, that just lists files that would be copied, without actually doing anything. That might be very useful for your needs. http://ss64.com/nt/robocopy.html
>
>Yes, this would do for identifying the presence of a file. However, as mentioned in this thread, as none of the .NET classes support such, it is pratically impossible to work with such a file as every manipulation I would do with the file, such as zipping, unzipping, renaming, moving, deleting, file directory list, filtering, copying, executing, etc., which requires several of .NET classes, would not work.

In that case, the 3 blog entries at http://blogs.msdn.com/b/bclteam/archive/2007/02/13/long-paths-in-net-part-1-of-3-kim-hamilton.aspx are probably worth a look.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform