Thursday, October 31, 2024

Path Too Long Auto Fixer v5.5 - is the 1st tool that discovers, reports and auto corrects filenames and paths that are too long to fit under the Windows MAXPATH 260 character limit

Did you know Microsoft Windows™ Explorer will fail to copy files under certain conditions? Be sure all your back-up files are copied with confidence.

The Path Too Long Error is most common when migrating your files particular entire hard drives whether to cloud to other servers.

Other tools make you go through millions of files, one-by-one, renaming and copying them somewhere. Who has time for that now-avoidable activity?

Save days of an IT administrator's time to correct this issue that faces every company no matter what size they are.



PTLAFv55AnnouncementEnterpriseAutomationSoln



Main Features 

þ Identifies and auto fixes long paths in bulk
þ Discovers all long paths
þ Reports them in an Excel generated file to communicate to your users
þ Choose how to shrink paths, remove space, underscores, punctuations or hyphens/dashes.
þ Remove explicit words/characters from the paths.
þ Search and replace words from a corporate glossary in the path, PRD becomes Production
þ Explicite copy of create date, last accessed date and modified date maintained 
þ Explicite copy of hidden and read-only file attributes
þ Explicite ACLs copy and output, similar to icacls.exe
¹ 2 stage, failsafe redundant copy - fully logged transaction file
 

Enterprise Edtn

> Supports UNIX mounts of path 4096 characters long
ÿ High-speed Command line for script ability and automation
ÿ Generate Powershell scripts
þ Portable Edition available
Ö BUILT-IN COLLISION AVOIDANCE - if two files shrink to same name, this will guarantee uniqueness.
Ö CONSOLIDATE - allows you consolidate long paths to same directories, upon shortening process.

The most common way to get the path too long error is to have a too many sub-directories. For example the path below has 20 sub-directories! This is known a as deep directory and is very common in many work place shared drives, downloads and files shared on other operating systems (Max\Linux). The other common way is a filename is just too long.

Coping this path in Windows Explorer will fail. 

I:\WORK-CODE\EXAMPLE PATH TOO LONG\Documents\Business\Office Addon\v3-php-sdk-2.0.4\
        v3-php-sdk-.0.4\Dependencies\XSD2PHP\test\data\expected\ContactCompany\oasis\names\
        specification\ubl\schema\xsd\Common Aggregated Components\
        system-maintained configuration file\Helpv1.1.docx
        

Path Too Long Auto Fixer automatically fixes hundreds of deep directories and filenames so you don't have to .  

Now you can copy and sync your hundreds of files to the cloud, with out error.

Don't miss a file, on your USB backups or to the cloud.

Never miss an Online Backup again


google-drive-vs-dropbox-vs-amazon-cloud-drive-vs-microsoft-onedrive-battle

OneDriveGDrive and Dropbox, etc all enforce the the 260 character limit. You may not even see the errors if you don't check the logs, which most users do not.



File Server Migration Mitigation


FileServerMigration


With the imminent end of life support for Windows Server 2012 R2, file server migrations maybe part of your upgrade plan to Windows Server 2022. 

However, file server migrations with file names and paths that are too long will still fail.  Moreover, the Storage Migration Service will fail to the Azure cloud.


And note, the new Windows 2019/Windows 10 Path Too Long setting is not fully integrated into the entire system, so CMD.exe and Windows Explorer will not copy paths that are too long. 
https://blogs.msdn.microsoft.com/jeremykuhne/2016/07/30/net-4-6-2-and-long-paths-on-windows-10/

SharePoint File Share Migration 
SharepointFileMigrationV2

Copy files now to target username subdirectories from a SharePoint file share with new preserve target path option (see version 5.1 below). Move files over 15Gb and make sure they fit under the 260 max path limits. Furthermore, you can beautify names using a corporate glossary. 







zip-iconRequest Demo Download v5.5

Get PathTooLongAutoFixerR55DEMO.zip - You have to answer a few security questions to get demo. Send me your LinkedIn profile or corporate email for faster processing and validate you are a real person.

* Limited to return 1 row and opens this blog page on each run.


Guaranteed no malware, no spyware, no evil-ware of any sort, like the rest of my tools.
But I do like to get paid. Free demo tool.


What is the Path Too Long Error?

When a path such as "C:\directoryA\filenameB.txt"  which consists of a directory (A), filename (B, including extension) and drive letter (C) is great than 260 characters in length you will get the path too long error when coping/deleting/altering or moving.

It must meet this criterion; 


A (directory length) + B (filename length) + C <= 260 characters 



  • A. The filename with extension (filename.txt) must be less than or equal to 256 characters. (260-3-1)=256. Less 3 characters for drive letter C and 1 is for the invisible terminating null character.
  • B. The directory name must be less than or equal to 247 characters.
    (260-9-3-1) = 247. Less a minimum filename (including the extension) of length 9 to be created, drive letter C, and the invisible terminating null character.
  • C. The drive letter with a : colon and backslash \ characters for length of 3 characters max.
  • Combined A+B+C must be less than or equal to 260 characters. 


This Windows API MAX_PATH constant sets the max length to 260, and is used to build Windows Explorer. So when you use Windows Explorer to copy invalid lengths it fails.

This limit was imposed for a backwards compatibility issue with older Windows versions. FAT32, and NTFS has supported long path names (up to ~32768 characters), and many times programs could get around this length. Especially, other files systems such as MacOS/Linux where there is not limit to number sub-directories (each sub-dir with a max of 247 characters). So coping files from those OSes via a mounted/USB drive will fail.

Using Windows Explorer and .NET programs (this includes Powershell too) will give you this error.

Common Path Too Long Errors

A list of most common “File Name Too Long Errors” messages below; 

The most frequent errors are; 
  1. Source Path Too Long - The source filename(s) are larger than is supported by the filesystem.
  2. Destination Path Too Long - The filename(s) would be too long for the destination folder.
  3. Interrupted Action - An unexpected error is keeping your from coping the file.
    Error 0x80010135: Path Too Long
  4. Delete Folder - An unexpected error is keeping you from deleting the folder.Error 0x80070003: The system cannot find the path specified.
  5. Error 1320: The specified path is too long.
  6. The file name you specified is not valid or too long. Specify a different file name.

Other errors that are not so obvious but are caused by Path Too Long error; 

  • Cannot delete file: access is denied
  • There has been a sharing violation.
  • The source or destination file may be in use.
  • The file is in use by another program or user.
  • Make sure the disk is not full or write-protected and that the file is not currently in use.
  • Error Deleting File or Folder 
  • Error Copying File or Folder 
  • Cannot delete file or folder
  • Cannot Open
  • Cannot Copy
  • The file could not be accessed
  • File name could not be found
  • Could not find this item

Competition Breakdown

The heavily advertised Path Too Long Software and Path Too Long tool which is same company can only copy long paths to shorter paths.           

These tools are just copy tools, not discovery tools. My tool discovers and fixes paths that are tool long. Its specially purpose built for that in mind, to help a novice or an administrator to get the job done. 

Gotcha! These tools don't mention you have painstaking manually copy each long directory to a new shorter directory. Where are they ? How many are there ? 

Usually, there are huge number files fanned out to many different directories, particularly on shared drives at work. Currently, hard drives have a capacity of 12Tb of space or approx. 3,115,264 office documents

Competitor tools make you have to select either directories or files one-by-one and copy it somewhere. Will it work? You are guesstimating that new directory length is short enough. What if it not? Repeat, and try again. What if the filename is still too long? 


Who has the time to rename and move 100+ files to new directories? 

Issues with competitor tools; 

1) They do find the paths tool long to begin with!
2) You have to move/rename each directory or filenames one-by-one
3) They don't find filenames that are too long, so moving will not help
4) No algorithm to specifically fix long paths
4) No automation to fix long paths

Both FastCopyPath Tool Long tool and others do not identify filenames that are too long to begin with.

These tools make you have to  rename each filename one-by-one, if you elect to do so. 
If you don't next time you copy these files, you get the error. It's an incomplete solution. I am repeating myself because its seems people continue to buy those tools, without understanding the issue. 


Path Too Long Auto Fixer 
is only tool that automatically finds and fixes long paths and filenames on the market today!

Why Path Too Long Auto Fixer ? What's the value add? 



Path Too Long Auto Fixer uses a patent pending unique algorithm that shortens paths and filenames. It  working its way back up the directories levels, shortening up, until the length is legal. This process is consistent for successive runs. Shortened paths are still readable and easily identifiable from the source.

This is a non-destructive process. No files will be lost. This is a copy, not a move or delete process. Until you are ready. There is an new option to delete long source file paths, and fix this issue for good, or at least until your next period of review.


PTLAF does what no other tool can; 

  1. Identifies and fixes long paths in bulk. 
  2. Reports them in an Excel generated file to communicate to your users.
  3. Choose how to shrink paths, remove space, underscores, punctuations or hyphens/dashes.
  4. Remove explicit words/characters from the paths.
  5. Search and replace words from a path.
  6. Identify media files, if moved, will break playlists. 
  7. Command line for script ability and automation
  8. Unicode control characters are removed from paths. All Unicode right-to-left characters (except U+061C in case you need this functionality) are removed. Right-to-left characters are used in malware attacks.
  9. Searching filenames with no extension "*." and matches repeating '?' is supported. For example, searching for all filenames with extension of length 3 is "*.???"
  10. BUILT-IN COLLISION AVOIDANCE - if two files shrink to same name, this will guarantee uniqueness. 
  11. Consolidate option - allows you consolidate long paths to same name paths, upon shortening process.
  12. Explicit option to copy ACLs, attributes and timestamps.
  13. Verbose runtime logs.



What make this solution the Best Choice ? 


Path Too Long Auto Fixer (PTLAF) rocks because in a few steps you can copy  thousands of files PTLAF will identified the multitude of long paths (directories) and filenames and correct them so you manually do not have too! 

PTLAF is the first and 
only tool on the market that does this today !

PTLAF use an innovative algorithm to shortening filenames and paths so they are still human readable and unique. We are not using 8.3 names here, we have designed our own algorithm here. Download and try it for free!




Release v5.5 DEMO App



Path Too Long Auto Fixer rocks because can copy thousands of files  to a new directory in seconds. 


Release History

Release V5.5 Improvements

  1. Explicite ACL copy option
  2. Explicite Timestamp copy option
  3. Explicite Attributes copy option
  4. Output ACLs to processing log file, similar to icacls.exe.

Release V5.1 Improvements

  1. Do not shrink specified portion of target path.  This prevents the target path from being part of the shortening process. This particularly helps with SharePoint migrations.
  2. Generate command line equivalent for results that are copied or Excel file download of found results.
  3. Create Date    Added create date of the source path to the results window. You can sort now by create date. This will transmit cut'n paste from results windows or when you download Excel of all results. Moreover, the command line now gets two new options: sort by create date "datesort" and "nosort". Nosort skips sorting at all. 

Release V5.0 Improvements 

  1. Sub-path replace option will search and replace words in each sub-dir path as split by Delim option.  Replacement occurs for the entire sub-path/directory. There are no word boundaries.

  2. Global replace  option will search and replace words/characters in the entire path, a global search and replace. Replacement occurs on the entire path. There are no word boundaries.

  3. Consolidation, is a feature that means successively selected shortened sub-directories that resolve to same name are allowed. Default, is OFF, to keep all directories names unique after shortening. In worst case scenario, this requires a hash sub-directory name to be used. Default is 0 or false.

  4. Modified blacklist word file to remove words in each sub-dir path as split by Delim option. Replacement now occurs for matching whole words only, not within a word.

  5. Modified global blacklist word file to remove words/characters in the entire path, a global search and replace. Replacement now occurs for matching whole words only, not within a word.

  6. Better command line help for ptlautofixer.exe!

  7. Improved Excel output format

Release V4.9 Improvements 

  1. Added final fixed paths .CSV file
  2. Converted .TSV to .CSV files for Found Paths Grid Export

Release V4.8 Improvements 


  1. Added adjustable setting Max Path Length [Range 16-260]
  2. Added adjustable sub-directory length [Range 1-247]
  3. Preserve File Name Hard Cut - just cut the filename, no shortening methods will be applied.

Release V4.6 Improvements 

  1. Excel dump of found paths and compressed paths 
  2. Tagging OneDrive files
  3. Better Unicode coverage for delimeter types

Release V4.5 Improvements

  1. One button FIX
  2. User interface is more responsive and user friendly (more warnings)
  3. Added new filename search filters such as searching files with no extension "*." and matches repeating '?' is supported. IE Search for extension of length 3 is "*.???"  
  4. New delimiters. Delimiters are used to split each sub-dir path into words. Delimiters are combinations of Unicode Spaces, Hyphens/Dashes, Underscores and Punctuation characters. 
  5. Added empty source directories detection and deletion option.
  6. Added media file detection in advanced options
  7. Collision detection, if generated shortened name happens to result in the same previous generated short name, this will rename it to avoid collisions.
  8. Fix button produces a full transaction log (C:\Users\{Username}\FixLongPaths_{timestamp}.log) so you can track file changes.
  9. Full Unicode support for paths and delimiters.
  10. Control characters are removed from paths. All Unicode right-to-left characters (except U+061C in case you need this functionality) are removed. Right-to-left characters are used in malware attacks. 



Advanced Options Explained

1. Target MAX Path 
All target paths will be shortened to this length. Default is 260. Range [16-260]
2. Target Sub-Directory Length
Specify is an integer indicating sub-directory minimum length. This is the minimum each sub-directory will be shortened too. Default is 247 (Windows Directory Max). Range [1-247]  
In extreme cases (for very very long paths > 300) , this setting maybe ignored. 

3. Limit Results

Limit number of rows returned. Default is 0, for no limit, it returns ALL resultant rows. 
4. Preserve File Length (PFL)
Preserve file length (PFL) is intended to provide a sliding scale to the shortening length of the filename. PFL length will cut the filename to specified length. The shortening process will still apply to this smaller length, unless you use PFL Hard Cut which stops the shortening process.      
It intended to give you better control where most of the shrinking process should occur, in the filename vs sub-directories.      
This length does NOT include extension length. For example, length 3, represents filenames: won.txt or won.text. Range [1-257]
To preserve exact filenames, set to maximum of 257, then filename will not be shortened and choose Split Delimiter to NONE. 
To maximally shortened the filename you can set to 1.
Default is 5 characters long. 
          In extreme cases (for very very long paths > 300) , this setting maybe ignored.


4. PFL Hard Cut
The filename will be chopped (from beginning of the filename, not including the extension) at PFL limit. No shortening will applied to chopped filename. So it's simply the original filename cut at PFL length set above. Default is unchecked.
In extreme cases (for very very long paths > 300), this setting maybe ignored.  

5. Abbreviate

          Apply abbreviation to filename and sub-paths that are selected to be shortened successively (not entire path) by removing vowels, creating a sort of ad hoc abbreviation. Note: There are 2,105 Unicode vowels that will be checked against for each character in the path, if selected. All languages are included, except Chinese (any code point prefixed with CJK & Yi & Yijing). See https://unicode-table.com/en/blocks/. Note: 2-character words starting with vowel are not abbreviated.

 6. Split Delimiter 

Split Delimiter specifies a delimiter combination to split filename and sub-directories (if targeted for shorting) into words.
In the shortening process, all Unicode control characters** and vowels* are removed first, then specified delimiter is removed from the path, in order to shorten it.
There are 4 types of delimiters and are fully Unicode supported (meaning all characters found in the full range of Unicode characters are cataloged.) 
Delimiters are Unicode white space (29 characters), Unicode underscores (11 characters), Unicode hyphens (38 characters) and Unicode punctuations (4,321) characters. 
Punctuation delimiter represents all Unicode characters categorized as a punctuation. This consists of union of 567 punctuation characters including !,",#,%,&,',(,),*,,(comma),.(period),/,:,;,?,@,[,\,],{,}... and 3,754 Unicode symbols including $,+,~,¢,£,¤,¥,¦,§, etc.. 
*Note:  There are 2,105 Unicode vowels that will be check against for each character in the path, if selected. All languages are included, except Chinese (any code point  prefixed with CJK & Yi & Yijing). See https://unicode-table.com/en/blocks/
**Note: A total of 84 Unicode Control characters and right-to-left characters are 
removed. All Unicode right-to-left characters (except U+061C in case you need this functionality) are removed. You can use the blacklist word feature to remove U+061C Unicode characters as well. Right-to-left characters are used in malware attacks.
Default is All3HSU, and includes combintaion of hyphens(H), spaces(S) and underscores(U).  
7. Sort Order
Specifies sort order of the resultant rows and sort of order of copied rows to clipboard. Default is descending order. 
8. Tag Media Files

Enabling this allows to optionally stop processing so you examine this issue in detail, before committing to changes. Media files that are moved/renamed will break playlists. This option will alert you and mark media files in generate script and log files, so you can track and communicate potential issues. Default is checked.
Media files types scanned are *.mp?*.m4?aiff*.au*.aup*.epub*.ipa*.itc2*.itl*.itdb*.m3u*.m3u8*.mid*.mov*.mpg*.pls*.wav*.wma*.wmdb*.wpl*.xspf.
9. Title Case Path

Specifies to title case each word in the path as split by Delimiter option (2 above). For example "justice league.txt" becomes "JstcLg.txt" using Space delimiter. Default is checked. 
10. Use Word Filter 
Blacklist word file (filterwords.tsv, Unicode UTF-8 encoded) is used to remove words in each sub-dir path as split by Delimiter option (2 above). Replacement occurs for matching whole words only, not within a word. Order of words in the file is very important. Default unchecked. 
11. Use Global Filter 
Global blacklist word file (globalfilterwords.tsv, Unicode UTF-8 encoded) is used to remove words/characters in the entire path, a global search and replace.  Replacement occurs for matching whole words only, not within a word. Use wisely! Replaces in target destination root 'Copy to' directory as well. Order of words in the file is very important.
12. Sub-path Replace
Enable sub-path replace word file (SRwords.tsv, Unicode UTF-8 encoded) to search and replace words in each filename and successive sub-dirs as split by Delim option, stopping when it meets the MAX path length. Replacement occurs for the entire sub-path/directory or filename. There are no word boundaries. Order of words in the file is very important!!! Case matters. Following characters are not allowed  < > : " / | ? *  .TSV is a tab delimited file. Default unchecked.
13. Global Replace 
Enable global replace word file (globalSRwords.tsv, Unicode UTF-8 encoded) to search and replace words/characters in the entire path, a global 'search and replace'. Replacement occurs on the entire path string, all subdirectories and filename. There are no word boundaries. Order of word pairs in the file is very important!!! Warning! Use carefully. Case matters. Following characters are not allowed  < > : " / | ? *  .TSV is tab separated values. Supports Unicode (UTF-8). Default unchecked.

14. Delete Source Files 

Delete all source files will fix long paths for good. Once you are comfortable with this tool use this. Default unchecked.
If selected, clicking the Fix button, will prompt you 3 times to proceed with this. If selected, clicking the Fix button, the 3 times prompt will not appear.
Use wisely! Deleted files are not recoverable. There is no recycle bin.  
Tip: Back-up your files beforehand. Use this tool periodically (monthly) to check your files. The command line can be scheduled to do this in a script.

15. Consolidate
Enable consolidation, meaning successively selected shortened sub-directories that resolve to the same name are allowed. Default is OFF, to keep all directories names unique after shortening. In the worst-case scenario, this requires a hash of sub-directory name to be used. Default is unchecked.
16. Copy Timestamps
Enable copying of time stamps from source to target folders and files. Timestamps include Create, Last Access and Last Write timestamps. Default is unchecked.
15. Copy ACLs
Enable copy of access control lists (ACLs) from source to target. This only when source and target drive are NTFS formats. Default is unchecked.
If not enable, permissions are set to user that the program is running under.
15. Output ACLs
Write ACLs for both source and target to the log file. NOTE: This can slow down processing. Yields similar results as the icacls.exe command. Default is unchecked.
16. Copy Attributes
Enable copy of attributes from source to target for folders and files. Attributes include read-only, hidden, archive and system. Default is unchecked.

 

PTLAFv55AdvancedMenu




Excel Discovery Reports & Logs

Generate Excel Discovery reports using Excel download button. Once you have found some results, the Excel button will appear.



PTLAFv55DownloadExcel






Below is example of a discovery CSV report, the number of paths too long that have been found. 


PTLAFv55ExcelResults


All reports and logs can be found in directory; 
C:/Users/%username%/Documents/PTLAF

PTLAFReportandLogDirectoryListing








Quick Instructions - One Click Fix

PTLAFR4DEMOMainMainGUIInstructional

A quick 4 step process;

  1. Choose   Start Directory to search for long paths in.

    Default will suffice in most cases, and points to user's document directory.
  2. Choose  B  destination directory for files to Copy To. Can be external drive or cloud drive. 
    You can leave this blank and it will be an in-place copy.
  3. Select 1 button to Find Paths Too Long.

    Wait for results in D.

    If there are no results, then you have no long paths!

    Selecting rows and copy and paste into Notepad to examine rows in detail.
  4. Select 2 Fix button to do process now. 


Note will include empty directories that are too long.
Note E advance menu, including Advanced Options, Help and About.

Using Advanced Options Window Tips


Quick Tips;

  • Preserve File Length (PFL)

    Choose 3 as absolute min  to ensure filename and paths are still readable, but get maximal compression. But you can but can goto 1 if you really need to super crunch the file name.

  • Split Delimiter

    Choose All for maximum removal of spurious characters like !@, in filename.
  • Word Filter - Comes pre-populated to check the file for values, so they work for you.

    Filterwords.csv comes pre-loaded with some default words;
     

    a, also, an, and, as, but, either, for, if, is, its, lest, neither, nor, or, so, such, than, that, the, their,  these, this, those, yet



Quick Instructions - Get Command line equivalent 



When you Open Excel file you'll see the command line equivalent generated, which your can copy and run on the command line.  

PTLAFv55ExcelResultsCommandLineGenerated















Licensing

For license inquiries send email via contact form (right panel).

Licenses are sold on a per seat basis, tied to user account and hardware fingerprint.
  1. Home user license is $99.00 USD per computer. Does not support mapped network drives.
  2. Small business license is a minimum charge of $257.00 USD.
    Additional, per user cost for a small/large company or on a server is $97.00 USD.
     
  3. Large business/Enterprise license is a minimum charge of $500.00 USD. Additional, per user cost for a small/large company or on a server is $97.00 USD.
  4. License on Virtual Machines is equivalent to 5.
  5. Enterprise (unlimited license, portable) please use contact form. Negotiable. Roughly based on the size of the company.

Licensing Process





  1. I'll send you a License Info Gathering  tool and email results back.
  2. This information is used to make a custom software build for you.

    LicenseInformationGatherer
  3. Note: MAC address is used because it's a physical signature of your network card, and generally not supposed to be changeable, but easily is. Your MAC address will not be disclosed to anyone. 
    For added comfort read this;

    "Is it safe to share you MAC Address ?" question on  StackExhange .
  4. Furthermore, all this information will not be share with anyone and is used exclusively for licensing of this product.

Extensive Scriptable Command Line for Administrators


PTLAutoFix.exe CMD Line Help

NAME PTLAutoFix.exe - auto shrinks paths that are tool long for Windows

SAMPLE USAGE ptlautofix.exe  Root="C:\Users\Golden Eye\Documents" SMin=250 delim=all format=all echo=1 edirs=1 tc=true abbrv=1 pfl=5 cnt=1 warn=1 ln=1 fc=1 mfw=0 et=1 noacl=1

DESCRIPTION Path Tool Long Auto Fixer Tool is the 1st tool that discovers, reports and auto corrects filenames and paths that are too long to fit under the Windows MAXPATH 260 character limit. The shortening algorithm starts at filename and works its way up the subdirectories towards the root, stopping when it meets the maximum path length you have selected. Shorten sub-directories and/or filenames using the arguments by removing various characters or search and replacing whole words/characters, etc.

ARGUMENTS Arguments are case insensitive, for example SMin= or smin=. Attention: In extreme cases (for very very long paths > 400) , arguments may be ignored as required to fit paths to 260 characters long. Especially, in the case of mounting UNIX paths which have a maximum path length of 4096 characters.

-- REQUIRED -- Root="drive:\path"  The root directory path(quoted) to start recursively enumerating all sub-directories and files.

-- OPTIONAL --

  • Dest=["drive:\path"]  The destination path(quoted) to replace the Root directory in the results. Default is null.
  • Search=[searchstring]  A file search pattern to filter filenames with. '*' matches many, '?' matches a character. Repeating '?' is supported, ie '*.???'. Searching for '*.' (no extension) is supported. Default is '*'.
  • tminsubdir=[1-247]  An integer indicating the minimum sub-directory length to be preserved to paths that are shortened successively as split by Delim option, stopping when it meets the MAX path length. Experiment with this to prune the source directory tree structure when copying a large tree structure to target. Default is 247 (Windows Dir Max).
  • tmaxpath=[16-260]  An integer indicating the target MAX path length. All target paths will be shortened to this length. Default is 260 (Max Legal Path for Windows).
  • SMin=[0-32767]  An integer indicating the minimum search length that a path must contain in order to be returned in the results. Default is 260.
  • SMax=[0-32767]  An integer indicating the maximum search length that a path may have in order to be returned in the results. Default is 32767.
  • Format=[Len|Path|Both|SLen|SPath|SBoth|Paths|All]  Format the resultant output. To display the [Len]gth or [Path], or [Both](combined) of found paths. Likewise, for the shortened length [SLen] or path [SPath], or both combined [SBoth] of the found shortened paths. [Paths] = Path + Spath. Default is All.
  • Abbrv=[1|0] or [true|false]  A boolean to specify whether paths are shortened by removing vowels, creating a sort of ad hoc abbreviation. Note: There are 2,105 Unicode vowels that will be checked against for each character in the path, if selected. All languages are included, except Chinese (any code point prefixed with CJK &  Yi & Yijing). See https://unicode-table.com/en/blocks/ Note: 2-character length words starting with vowel are not abbreviated.
  • Delim=[S|H|U|HS|US|All3HSU|P|SP|HP|UP|HSP|USP|ALL|NONE]  Specifies a delimiter used to split the filename and each sub-directory(if shortened) into words. The delimiter itself is removed. Delimiters are combinations of Unicode Spaces(S), Hyphens/Dashes(H), Underscores(U) and Punctuation(P) characters.  The default is All3HSU (Hyphens & Spaces & Underscores)  which splits on all Unicode Hyphens(38), Spaces(29) and Underscores(11) characters.Lastly, &#xA;Unicode Punctuations(4,321) consists of the union of 567 punctuation characters including !,",#,%,&,',(,),*,,(comma),.(period),/,:,;,?,@,[,\,],{,}... and 3,754 Unicode symbols including $,+,~,¢,£,¤,¥,¦,§, etc. Tip! Using NONE will preserve src path (loosely mimicking a normal copy cmd), BUT will truncate paths to 260 characters long, to be valid.
  • Sort=[Asc|Dsc]  Specifies sort output direction. The default output is sorted by the length of the source path, unless DateSort is specified. Default is Dsc (Descending).
  • DateSort=[1|0] or [true|false] The output is sorted by the create date of the source path. Default is 0 or false.
  • NoSort=[1|0] or [true|false]  A boolean to bypass sorting, generally for speed. Default is 0 or false.
  • Copy=[1|0] or [true|false]  A boolean to copy source files to shortened targets. Default is 0 or false. ATTENTION: Full collision detection correction is auto set "fc=1" to true.
  • Con=[1|0] or [true|false] - NEW v5.0  A boolean to enable consolidation, meaning successively selected shortened sub-directories that resolve to the same name are allowed. Default is OFF, to keep all directories names unique after shortening. In the worst-case scenario, this requires a hash of sub-directory name to be used. Default is 0 or false.
  • dsf=[1|0] or [true|false]  A boolean to delete all source files, use "edirs" for directories. Must be used simultaneously with the "Copy" argument. Default is 0 or false. Warning! Delete files are not recoverable. Delete files will not appear in the recycle bin!!!
  • edirs=[1|0] or [true|false]  A boolean to add empty directories in the results. If used in conjunction with the "dsf" argument, it will delete source empty directories. Default is 1 or true.
  • ded=[1|0] or [true|false]  A boolean to post detect and delete all empty directories possibly surfaced by using "dsf" argument.  "copy", "dsf" and "ed" arguments must be simultaneously specified. Default is 0 or false.
  • echo=[1|0] or [true|false]  A boolean to verbatim echo given command line. Default is 0 or false.
  • mft=[1|0] or [true|false]  A boolean to tag media files in the output. Media files types scanned are *.mp?|*.m4?|aiff|*.au|*.aup|*.epub|*.ipa|*.itc2|*.itl|*.itdb|*.m3u|*.m3u8|*.mid|*.mov|*.mpg|*.pls|*.wav|*.wma|*.wmdb|*.wpl|*.xspf. Default is 0 or false.
  • mfw=[1|0] or [true|false]  A boolean to enable media files warning and immediately stop processing if a media file is found, especially during a copy.  Default is 0 or false.
  • PTP=[1|0] or [true|false]  A boolean to enable prevent the shrinking of target path specified, but still below this level. If not enabled this path portion will be considered in the shortening process. Default is 0 or false.
  • PFL=[1-257]  An integer indicating the filename length (NOT including file extension length) to be truncated too. The shortening process will still apply to this smaller length, unless you use PFL Hard Cut which stops the shortening process. Preserve file length (PFL) is intended to provide a sliding scale to the shortening length of the filename. It intended to give you better control where most of the shrinking process should occur, in the filename vs sub-directories. To preserve exact filenames use 257, and split dilimiter NONE or PFL Hard Cut. 1 will shorten filenames maximally (all filenames will be 1 character). This setting has no effect on shortening of sub-dirs. Default is 5, a small filename. Range [1-257]
  • PFLcut=[1|0] or [true|false]  A boolean to enable the filename to be chopped (from beginning of the filename, not including the extension) at PFL limit set above. It prevents the shortening process to be applied to the chopped filename. So it's simply the original filename cut at length PFL set above. Default is 0 or false.
  • wf=[1|0] or [true|false]  A boolean to use a blacklist word file (filterwords.tsv, Unicode UTF-8 encoded) to remove words in each sub-dir path as split by Delim option, stopping when it meets the MAX path length. Replacement occurs for matching whole words only, not within a word. Order of words in the file is very important. Default is 0 or false.
  • gwf=[1|0] or [true|false]  A boolean to use a global blacklist word file (globalfilterwords.tsv, Unicode UTF-8 encoded) to remove words/characters in the entire path, a global search and replace. Replacement occurs for matching whole words only, not within a word. Order of words in the file is very important. Warning! Use wisely. Default is 0 or false.
  • spr=[1|0] or [true|false] - NEW v5.0  A boolean to use a subpath replace word file (SRwords.tsv, Unicode UTF-8 encoded) to search and replace words in each sub-dir path as split by Delim option, stopping when it meets the MAX path length. Replacement occurs for the entire selected shortened sub-path/directory and filename. There are no word boundaries. Order of words in the file is very important!!! Case matters. Following characters are not allowed  < > : " / | ? *  .TSV is a tab delimited file. Default is 0 or false.
  • gr=[1|0] or [true|false] - NEW v5.0  A boolean to use a global replace word file (globalSRwords.tsv, Unicode UTF-8 encoded) to search and replace words/characters in the entire path, a global search and replace. Replacement occurs on the entire path. There are no word boundaries. Order of words in the file is very important!!! Warning! Use wisely. Case matters. Following characters are not allowed  < > : " / | ? *  .TSV is tab separated values. Default is 0 or false.
  • noacl=[1|0] or [true|false]  A boolean to list paths that are inaccessible from the root path. Generally, this indicates directories you do not have permissions too, but may include other path processing errors. The error is listed after the path separated by a comma. Note: Access permissions to files will be processed and logged when copying. Default is 0 or false.
  • tc=[1|0] or [true|false]  A boolean to Title Case each word as split by delimiter option. Default is 0 or false.
  • fc=[1|0] or [true|false]  A boolean to enable full collision detection correction. Default is 1 or true.
  • et=[1|0] or [true|false]  A boolean to output the elapsed time to generate the resultant rows. Default is 0 or false.
  • cnt=[1|0] or [true|false]  A boolean to output the count of the number of resultant rows. Default is 0 or false.
  • ln=[0-4294967295]  An unsigned integer indicating the number of lines to be returned in the results. Default is 0 (no limit).
  • warn=[1|0] or [true|false]  A boolean to output the command line parsing warnings and some potential non-critical issues. Default set to show warnings, set to ON as represented by 1 or true.
  • -lic, a flag to output the software license.
  • -v, a flag to output the current version.
  • -h, a flag to output help.
AUTHOR Written by Mark Pahulje, Metadata Consulting (http://MetadataConsulting.ca) REPORTING BUGS Report PTLAutofix.exe bugs to metadataconsult@gmail.com COPYRIGHT Copyright © 2017 - 2023 Metadata Consulting (http://MetadataConsulting.ca) LICENSE This is licensed commercial software. It requires a purchased license to use legally. See -lic for full details. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

Feature Highlight: Search and Replace Words in Paths 

There are two way to remove words/characters from a path;

  1. You can use a blacklist word file (filterwords.tsv, Unicode UTF-8 encoded) to remove words in each sub-directory path as split by Delimiter option. Replacement occurs for matching whole words only, not within a word. Order of words in the file is very important.  Available in Advanced Options and command line.

    Some suggestions for some default words

    a, also, an, and, as, but, either, for, if, is, its, lest, neither, nor, or, so, such, than, that, the, their, these, this, those, yet

  2. You can use a global blacklist word file (globalfilterwords.csv, Unicode UTF-8 encoded) to remove words/characters in the entire path, a global search and replace. Replacement occurs for matching whole words only, not within a word. Order of words in the file is very important. Warning! Use wisely. Available in Advanced Options and command line.

    globalfilterwords.csv comes no pre-loaded with some default words.
Most likely words you might like to remove are those you find redundant or non-descriptive. Your organization also may find and remove words that are verboten, like WTF and other internet slang. You can use this program to rename all you files (by doing a copy and delete, available in the generated script). 
  • Remove internet slang - WTF, Dafuq = (What) the f***?, FML = F*** My Life, Bitch, IDGAF =  I Dont Give A F***, etc.
  • Remove conjunctions - for, and, nor, but, or, yet, so, as, if, either, neither, also, etc,
  • Remove determinders  - a, an, its, that, the, their, these, this, those, such, etc  
  • Remove a single letter - ҂,!,@,#,' 

New to V5.0
1. Subpath Replcace
Enable subpath replace word file (SRwords.tsv, Unicode UTF-8 encoded) to search and replace words in each filename and successive sub-dirs as split by Delim option, stopping when it meets the MAX path length. Replacement occurs for the entire sub-path/directory or filename. There are no word boundaries. Order of words in the file is very important!!! Case matters. Following characters are not allowed  < > : " / | ? *  .TSV is a tab delimited file. Default unchecked.
2. Global Replace 
Enable global replace word file (globalSRwords.tsv, Unicode UTF-8 encoded) to search and replace words/characters in the entire path, a global 'search and replace'. Replacement occurs on the entire path string, all subdirectories and filename. There are no word boundaries. Order of words in the file is very important!!! Warning! Use carefully. Case matters. Following characters are not allowed  < > : " / | ? *  .TSV is tab separated values. Default unchecked.
3. Consolidate
Enable consolidation, meaning successively selected shortened sub-directories that resolve to the same name are allowed. Default is OFF, to keep all directories names unique after shortening. In the worst case scenario, this requires a hash of sub-directory name to be used. Default is 0 or false.





Saving a Unicode UTF-8 File:

If you plan to use Unicode characters in the .csv files make sure your are saving them as Unicode UTF-8 encoded file.
  1. Download and install this powerful free text editor: Notepad++
  2. Open the file you want to verify/fix in Notepad++
  3. In the top menu select Encoding > Convert to UTF-8 (option without BOM)
  4. Save the file
File Specification:

The file must not contain the following characters  '<', '>', ':', '"', '/', '|', '?', '*'  as they are reserved path and filename characters - see https://msdn.microsoft.com/en-us/library/aa365247.aspx for exact spec for valid path characters. 

The words are case insensitive. If phrase includes spaces, double quote it.

Example blacklist file to remove the following words from path and filename: 
҂,  so, this, that, WTF, FML, IDGAF, "F*** You",TW*T 

Technical Details


Tested On:
Windows XP ,7, 8, 8.1, 10, 10 CU and equivalent Server releases
Optimal min. screen size XGA 1024 x 768 (4:3 aspect ratio, introduced in 1990)


Software Specifications: 
Full Unicode support for filename and paths. 


Shortcuts (.lnk) files are processed to keep file counts equivalent to Windows Explorer, but maybe invalidated if target directory has changed.  This would occur in any tool including Windows itself, it's a perennial problem to manage shortcuts, but competitors never mention it. PTLAF provides a log file, to examine for affected files. Generally, this is an edge case (here for completeness) and not very common, since most users never use shortcuts.

To clear some ambiguity about
Shortcuts created in Windows Explorer, they are listed as a 'file of type' "Shortcut (.lnk)" in Properties pop-up.  They are not part of the symbolic link in classic NTFS reparse points definition. There are counted as files in PTLAF and Windows Explorer. 

Junctions <JUNCTION>, directory symbolic links <SYMLINKD> and file symbolic <SYMLINK> which are part of the Windows NTFS reparse points are not processed PTLAF.  These are types can be listed in DOS using DIR command and created using DOS MKLINK command. Windows Explorer correctly enumerates <SYMLINK> as a file. WARNING: Windows Explorer DOES NOT correctly enumerates <JUNCTION> or <SYMLINKD> links at all. It should be enumerated as a directory. Why do I mention this, so your understand the counts in PTLAF vs Windows Explorer.

A note about moving media files they have to potential to break media playlists, therefore are there's an option to tagged media files in log files. Offices files have same issue, because they can link to other files. Typically, Excel files can link to other Excel workbooks and if there references may break if moved or renamed. The log file can easily be searched for Excel files and Office files. Office files extensions are well known, and hence were not tagged separately in the log files. They can be individual searched for in the log file by their extension, ie .xlsx  for Excel workbook. 

Full Unicode support for path delimiters (dash, underscore, whites pace and punctuation) which are removed from the paths. Unicode vowels end with the Cyrillic code page. See Advanced Options Explained tab for more details.

Integrated AlphaFS 2.1 library to handle long paths over 260 characters and Unicode support. AlphaFS is a .NET library which is provided and supports extended length paths (longer than 260 characters).

Software Prerequisites:


Requires Microsoft .NET Framework 4 Framework. It's old but required for backwards comparability to Windows XP (and Windows Server 2003 ). 
You can get 
.NET Framework 4.5 is a highly compatible, in-place update to .NET Framework 4. Download here .

Exception for Windows XP use
Microsoft .NET Framework 4 (Web Installer). Download here.



Do you have . NET Framework 4 installed ? Check FAQ here. Or use this tool available here

For Windows 10/11 : 

To check if the.NET Framework 3.5 is available in Control Panel and to enable it, please follow these steps:

a) Press “Windows Logo” + “R” keys on the keyboard.

b) Type “appwiz.cpl” in the “Run” command box and press “ENTER”.

c) In the “Programs and Features” window, click on the link “Turn Windows features on or off”.

d) Check if the “.NET Framework 3.5 (includes .NET 2.0 and 3.0)” option is available in it.

e) If yes, then enable it and then click on “OK”.




Request Demo New Release v5.0 - 2022
zip-icon
PathTooLongAutoFixerR5.0DEMO.zip - You have to answer a few security questions to get demo. Send me your LinkedIn profile for faster processing and validate you are a real person


* Limited to return 5 rows and opens this blog page.

Guaranteed no malware, no spyware, not trackers, no evil-ware of any sort, like the rest of my tools.
But I do like to get paid. Free demo tool.



Privacy Statement


Path Too Long Auto Fixer (PTLAF) does not store, gather or forward any information to be sent to the developer MetadataConsulting.ca or transmit to any third parties. No real time or monitoring data is gathered by this tool, not like the competition. 

Startup Innovation Award


The INNOVA Award acknowledges companies in Ontario that has excelled for its innovative products and services in the market, thus creating an exemplary case of creative change for the Canadian business community. 

ICCO-FRIULI-INNOVA-AWARDS-2018-NOMINEE

Testimonies

Path Too Long Auto Fixer has been invaluable, as I had many gigabytes of cloud storage that could not be copied due to path too long issues. This tool fixed them all. The support provided by the developer and assistance with getting my task completed were excellent.

          Wed., 6 Dec. 2023, Mr. Ben. S, UK, Home Edition License

 

Satisfied Enterprise Customers



AnonymLargeLogo
ACON Laboratories, Inc. in 130 countries




CartroEnterpriseCustomer2022