Works with and greatly enhances:
Windows 8, 7, Vista, XP
Servers 2003 and later
Starting at just $50 for home use and $69 for a business license (and a business two-pack for just $99!)
Major new tools, significant upgrades to current components and lightening fast folder listings.
See the V4 preview here.
Problably the most common reason a file can't be renamed, moved or deleted is that it is in use by another program. Many programs, but certainly not all, will put a lock on a file when it opens it
For all versions of Windows released in the past fifteen years no file name or folder can be longer than
The same limitation to the length of the actual file name of 256 characters also applies to the length of any folder along its path.
The maximum length of the filename plus the path leading up to it varies the most depending on the version of Windows, the underlying file system e.g. NTFS, FAT, exFat, Unix based and on which program is trying to access the file. Normally it is 259 characters but some programs trying to work with the file will impose their own, shorter limits.
Many file systems support characters in filenames that the Windows operating systems do not. (Windows only provides top-level access to files on differing file systemes. Other operating systems such as Unix, iOS on Macs, and proprietary NAS systems normally allow more characters in file names -characters which are considered illegal by Windows).
This is closely related to the previous topic, illegal characters. When other operating systems have acces to the same files as Windows there is a great possibility file namew will contain characters that Windows considers illegal.
While rare, files can occure that have no name whatsoever.
Note that this is different than file names that have no root name just an extension. Having just an extension is perfectly legal under Windows but can be confusng if you are not aware of it. Fortunately files that have just an extension usually use unique extension not used by other files not the standard exe, com, bat and many others.
Warning: Be very careful when working with files that Windows or other programs have been protected with using the hidden, system or read-only attributes, especially when they are in the main folders created by Windows.
In general be careful of all files on drive C:\ especially in the folders Windows, Program Files, Program Files (x86), Users, Widnows and even Documents and Settings.
Fundamentally files (and folders) can be protected by Windows in three ways
When it comes to names and paths, folders (directories) and filenames are exactly the same: all rules that apply to filenames also apply to folder names. There is a common misconception that folders don’t have extensions (the name after the dot). But that is just a convention that developed from the way Microsoft first named most of Windows’ system folders many years ago. Any folder can have an extension just as any filename can exist without one. So when I mention filename in the rest of this post I’m also referring to folder names unless explicitly stated otherwise.
There are three parts to a full pathname.
Combining all three parts results in a fully-qualified filename (fully-qualified meaning that it is uniquely identified by having all three parts) would be something like C:\backup\accounts\2012-08-30\ checklog.db. From here on we'll refer to a fully-qualified filename as a pathname.
If you want to skip the following explanations of the (semi-)exact maximum lengths. Just remember that you really shouldn’t create any file with a total pathname length (drive, path, and filename and extension) greater than around 230 characters - and even then much shorter would be better. And perhaps even more important don’t create really long filenames for as they are copied around the will easily be copied to folders that already are long making them exceed the limits that can be handled by one program or another or even Windows.
For example if you create a filename that 240 characters long, say something like:
Annual report on the average gestation period of North American pelicans by professor emeritus…..issued on July thirteenth in the year two thousand and thirteen…and originally present to the symposium on….well received.docx
All may go well until the file gets copied to: \\AcmeCorpnet\backup\boring-papers which will create a pathname in excess of any reasonable limit and will create problems someone in the future.
Here is where the numbers come from in the traditional, as in original, Windows file system:
260 – Because there was only space to store 260 characters for each pathname. However, this is really only of significance to systems programmers and numerologists.
259 – Because one of those bytes had to be a null or 0 at the end of the string. You can’t see this last byte it is just there so that Windows and Windows programs would know where the end of the filename was. So that left only 259 possible characters in the visible, fully-qualified filename.
256 – Because some young, smart-aleck (who is by now an old, potbellied head of some insignificant section of a small computer department somewhere) said, “Well the drive isn’t part of the path name and that is three characters long (a letter, a colon, and a backslash e.g., C:\) so really the maximum length is 256 characters”. Why anyone listened to that smart-aleck we don’t know but people did and 256 became the number that people who knew little would utter with a condescending nod indicating they knew a lot more than that (but of cource, they didn't).
248 - I’ll explain this and the next one but you might just as well forget them immediately unless you can use them to impress your boss, your friend or your significant other. 248 equals 260 minus 12. Brilliant! why minus 12? Because that was the maximum length of a filename – 8 characters plus a dot plus a three character extension. And since a path always had to have space for a filename to be added to it, it couldn’t be longer than 248 characters. Of course this is the maximum length of a path without a filename, which really can’t exist by itself.
247 - Same as above except that the 12 characters for the name is subtracted from 259 instead of 260 as these people didn’t see and thus didn’t know about the trailing 0 (remember those people?).
180 – The approximate maximum length allowed by some file systems used when writing to CDs and other round, thin, removable media. The important thing to note here is that 180 is an approximate number that may vary a bit from CD to CD for various technical reasons only understood by those who decided to set the maximum filename for these devices to 180, approximately.
32,000+ - Available on some modern versions of Windows and modern file systems. Don’t count on this unless you really know what you are doing and are not adverse to experiencing true disaster down the road. Even when this length is acteive any single element of the full pathname (the filename itself or any one folder along the path, still can't be longer than 256 (or less).
And just because really long fully qualified paths are OK by Windows doesn't mean that other pograms will be happy with it.
The usable maximum pathname length depends not only on the storage media and version of Windows but also the programs that will be working with the file as some programs have smaller limits on file length and while these are becoming less and less common they still exist. But was is even worse is that some Windows functions can’t handle as long pathnames as other parts of Windows so you may be able to copy a file but not delete it.
We will discuss how to find files with pathnames long enough to create problems and how to handle them in a post later this week.
For complete details on how to efficiently find long filenames and rename them click here.