Link to home
Start Free TrialLog in
Avatar of sputrevu
sputrevu

asked on

Displaying long file names using C#

I need to list all the files in a shared folder. My file search program is throwing me a message saying that "The file name length must be less than 248 characters long".

But some paths in my UNC shares have more than 2000 characters.

How should I get the long file names using C#?

Do I have any Win32 API function to achieve this?
Avatar of Haris V
Haris V
Flag of India image

Avatar of openshac
openshac

You could run a bat file from C# and then just process the results:

There's an example on how to do this sort of thing here:

http://blogs.msdn.com/csharpfaq/archive/2004/06/01/146375.aspx
ASKER CERTIFIED SOLUTION
Avatar of sputrevu
sputrevu

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