Statistics

Total Posts: 34
This Year: 0
This Month: 0
This Week: 0
Comments: 174


RSS 2.0   SocialTwist Tell-a-Friend


Admin

Sign In

Navigation


Recent Posts


On this page....

What is the max length of a file name or folder name in Windows OS?

Archives

 Full Archives By Category
 2007 Calendar View
<February 2009>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
1234567

Categories

CDOSYS (1) Classic ASP (10) Command Line (2) Databases (16) Excel (1) HTML (1) IIS (10) Indexing Service (1) Internet Explorer (7) Media Streaming (1) MS.Net (2) SQA (7) SQL Server (16) Windows OS (2)

Blogroll - Fav Blogs


Acknowledgments

DasBlog Theme Design by: Tom Watts
E-mail: Send mail to the author(s)
Theme Image by: dreamLogic

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Technology Blog

Most of you have been using Windows OS. Have you ever tried finding, what is the length of a file name or a folder name could be? Except those who have specifically worked on File system Object (FSO) would have not bothered to know as how a file and folder name is defined in Windows OS.

Well the answer to this question is that it’s not the length of the file name or folder name; but the number of characters in the full path of the file or folder defines the max size of a file name or folder name in Windows OS. The max length of a file or folder path including itself is 255 characters (in Vista this is 260 characters).

For example, a folder name in the root of a drive (c:\ or d:\ or etc…) would be 244 characters long and a file name in the root of a drive would be 251 characters. If you have a folder name of length 244 characters long in the root drive of your hard disk, you will not be able to save a file or create a sub-folder under it. You would receive an error message “Destination path too long”.

I will end this article with few questions, which I will try to cover in my next article. Most of us have developed Document Repository System or written programs for uploading and storing files on the disk. Have you really taken care to check the file name or folder name length before uploading it to the server? How do we store files with long names? Is there any alternative apart from physical file storage on the disk?