Click here to Skip to main content
13,803,372 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 23 May 2013
Licenced CPOL

Dealing with long file names in VB.NET

, 23 May 2013
Rate this:
Please Sign up or sign in to vote.
A class using Win32 Unicode calls to handle file names/paths longer than 254.


This article explains using Win32 Unicode calls to handle long file names and paths.

Using the code

This code is basically untested. The FileEnumerator.vb class is straight from Microsoft. Win32Delcares.vb from Microsoft with the declarations changed to Unicode. ioWin32 has: CopyFile_Win32, DeleteFile_Win32, CreateDir_Win32, CopyDir_Win32, GetFilesIncludeSubDirs_Win32, GetDirsIncludeSubDirs_Win32, GetDirs_Win32, GetFiles_Win32, FileExists_Win32, DirExists_Win32, DeleteDir_Win32.

Dim sFiles() As String = IOWin32.UnicodeWin32.Functions.GetFiles_Win32("C:\temp\")
instead of
dim sFiles() as string ="C:\temp\")


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.181215.1 | Last Updated 23 May 2013
Article Copyright 2013 by terry_tldsb
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid