LCS Game Development Tools
FindLongFiles - The find long filespecs utility for Windows

What's on this page:







FindLongFiles Screenshot

Locate all filespecs that are longer than the specified length!

Have you ever tried to perform a copy or xcopy of data files from one folder tree structure to another folder tree structure, only to have the copy fail because the destination folder tree root was a few characters longer than the source?

Then FindLongFiles might be the utility for you!

Some Background

The Windows API defines the maximum path length for file specifications with the constant MAX_PATH which is equal to the value 260 characters.
Some CD/DVD disc formats are even shorter.

A file specification typically contains the drive letter, a colon, a backslash, zero or more directories separated by backslashes, the file name, an optional file extension that begins with a period, and a null terminator character.

An example file specification: C:\Data\Photos\2013\MyHouse.jpg

The directories and separators, and the file name and file extension, have a maximum length of 256 characters.  The drive letter, colon, and backslash at the front, and the null terminator at the end, total another 4 characters.  When these 4 characters are added to the 256 characters, it gives a maximum total length of 260 characters.

A maximum file specification: d:\<a 256 character path and file name string><NULL>

Some Problems

So now an issue can arise if I have one or more files that have very long directory and file names, and I attempt to copy them to another drive or folder tree where the root tree structure may be longer.

If any of the file specifications in the destination folder tree structure will be more than 260 characters, an error will occur.

The big hassle is that Windows will just kick up an error without informing you of which file(s) are causing the issue.  In fact the error message may even be a cryptic and misleading Insufficient Memory error.

An example:

I have a bunch of files with long descriptive names that I sorted into multiple folders.
These files are currently sitting in the drive:

    D:\Data\<all of my files sorted into long folder and file names>

Let us assume for this example that many of the long folder and file names are up to 240 characters in length.  So with the D:\Data\ root prepended onto the file specification the files can be as long as 240+8 = 248 characters.

I now wish to copy these files onto an external USB drive for backup, and I chose to create a root folder for myself that was:

    G:\David's Files\Data\<all of my files will be copied to here>

The addition of the David's Files\ root tree folder will now cause some of the file specifications to be longer than 260 characters.  Windows will error, the file copy will fail, and often the error message is confusing and doesn't seem relevant.

The Solution

If you are copying files from one root tree structure to a different root tree structure, and the copy is failing, you may need to check that none of the source file specifications are too long to fit into the destination tree structure.

FindLongFiles will do just that!

Simply run FindLongFiles starting at the desired root folder to get the list of filespecs that are too long, then rename the over-length directories to shorter names.


- Fully featured software with an easy to use interface
- Small footprint, 80kb exe file, less than 5mb default memory usage
- Written entirely in Microsoft C# dotNet
- Fully multi-threaded Windows application
- High-performance search (typically 100k files in 5 seconds)
- Supported on every OS that supports dotNET 3.5, including virtual machines
- Doesn't require installation, just run the exe
- Doesn't make any changes to the OS, no registry entries, no extra files

System Requirements

- Windows XP or later Desktop OS (XP, Vista, 7, 8, etc.)
- Windows 2003 or later Server OS (2003, 2008, 2011, 2012, etc.)
- Microsoft dotNet 3.5


Please read this license agreement fully.  If you do not agree with the license then do not download the software.

Software License Agreement

By using this software you agree to all of the conditions set forth in this license agreement.
If you disagree with one or more conditions set forth in this license agreement you must discontinue use of this software immediately.

This license grants you an indefinite non-exclusive use of this software for personal or commercial use.  No fee or cost or obligation is required for personal or commercial use.

This software including any documentation and files is provided without any warranty of any kind.  You, the end user, assume all responsibility for your use of this software.  LCS is not accountable for any data loss or other losses incurred by your use, misuse or inability to use this software.

You may not sell this software. You may not place this software on web sites for download. You may not distribute this software by any other means including torrents or downloads, or on distributable media including disks or cds. You may not bundle this software with other software for any form of distribution.

You may not reverse-engineer or disassemble or create derivitive works based on this software or use portions of this software for a template.  LCS retains all rights and copyrights and trademark rights to this software. LCS owns all copies of this software.

This computer software is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this software, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under law.


By clicking on the link to download the file you are agreeing to the license above.
This file is in Zip format and can be extracted with Windows Explorer or WinZip.

   Download Size: 33.3kB   (34,172 bytes)
   File Name:   (Zip 2.0 compatible)
   Date Published: 2013-06-15 10:50am  (date of FindLongFiles.exe file)
   Exe Size: 80.0kb   (81,920 bytes)
   Language: English
. .


FindLongFiles does not require any installation, makes no changes to the Windows operating system, and doesn't create any additional files.

1. Download the zip file to a temporary folder.
2. Extract the exe file from the zip file using Windows Explorer's Extract or Winzip.
3. Create a new folder in the "Program Files" folder called "FindLongFiles".
4. Copy the exe file to this new folder.
5. Right-click on the exe and choose Properties and if there is a "Blocked" button on the General Properties tab, click on it to unblock.
6. Optionally right-click on the exe and choose Pin to Start Menu.

Running the Software

To run the software, simply double-click on the exe, or right-click and choose "Open" from the context menu.

1. Click on the Browse button and choose the root folder to check the files within.
2. Set the maximum allowable file specification length in the Spec length numeric box, typically this will be 260 minus the destination root tree path, eg. 240.
3. Click on the Search button.  The software will begin the search.
4. Look through the results to see what folders may require renaming to a shorter directory name in order to shorten the total file specification.

Optionally copy all of the results data to the clipboard, where it can be pasted into other software such as notepad for saving, printing, sharing, etc.

Note that each file specification found that was longer than the Spec length value has its current length value prefixed to its entry in the results.  For example the first file specification in the results listing below is 182 character long.

Note that the number of Error (permissions) entries are typically only those few folders on your computer that you do not have the proper user permissions to access.  These are typically hidden system folders and files that you normally won't encounter in your data folders.  If the search results include any Error entries that does not mean that there are errors on your hard drive or your files.  It only means that FindLongFiles was unable to process those folders or files.

FindLongFiles Screenshot


1. FLF has only been tested on Windows XP Pro x32, Vista Business x32, 7 Home Premium x64, 7 Professional x64, 8 Full x64, Server 2003 x64, Server 2008 x64, SBS 2011 x64.  And in Windows OS's within VMware Player 5.

2. FLF does not make any changes to your computer system, any operating system files, or the registry, and does not save any hidden files or configuration files.  Removing FLF from your computer is as easy as deleting the exe file.

3. FLF automatically determines whether it is running on a 32-bit or 64-bit operating system and executes accordingly in full 32-bit or 64-bit mode.

4. FLF will not run without Microsoft dotNet 3.5.  Some Windows OS's require that dotNet be downloaded from Microsoft and installed, in most cases it is already installed with other software on your computer.

5. FLF maintains its results list in memory.  If you search through millions of files using an unrealistically low Spec length that returns every one of those millions of file specification, the amount of memory used to store all of the results can become hundreds or thousands of megabytes, which typically will not be an issue unless the computer only has 1GB of RAM or less.

Version List


- Initial release.

Terms of Use  |  Trademarks
Copyright 2013 LCS  |  British Columbia, Canada