Windows Path Length Limitation (260 characters)

Windows defines the maximum length for a path at 260 characters.

You can mount a folder as a drive, or use symbolic links, to create a shorter path length, although I prefer to identify all offending file names before copying the data.

From the command prompt run dir /s /b > output.txt  to get a list of all file names (with full path).

The following PowerShell script will list all files with a path length greater than 260. Navigate to the folder you wish to scan or run from the root.

cmd /c dir /s /b |? {$_.length -gt 260}

 

You May Also Like