How To Guides Org

How long can a filename or path be in Windows 7

Ever wondered how long a filename can be in Windows 7? Or filepaths? Copying files from Linux filesystems to Windows filesystems and running into problems?

The maximum file name length Windows 7 usually limits is 260 UTF-16 characters (including complete path count, eg – c:\ and .txt).

However, this limit also applies to the filepath e.g.

C:\this is a very long … very long\on a subfolder\and more subfolders\and more…\  (LIMIT IS 260 characters)

On some Linux filesystems like ext3 you can have a directory depth of 32,000, but the filename length is also only 255 bytes (255 characters)

 

So, Windows 7 allows you to have your filename upto 260 characters (including path and extension count). Beyond that, it will automatically discard the filename or does not allow you to add more characters.