Welcome to MSDN Blogs Sign in | Join | Help

File System Limits

When you create a file or a folder, do you check that the full path is not too long?! Make sure that you handle the PathTooLongException:
 
PathTooLongException
 
Try to exceed the maximim lenght on Windows, and you'll get this error:
 
Destination Path Too Long
 
Here are some limits in Windows APIs that you should know about:
 
#define MAX_PATH 260 // Maximum length of full path
#define MAX_DIR 256 // Maximum length of path component
#define MAX_FNAME 256 // Maximum length of file name component
#define MAX_EXT 256 // Maximum length of extension component
Published Friday, December 14, 2007 5:53 PM by mohamedg
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker