How to find files whose paths are too long

Page 1 of 3 123 LastLast

  1. Posts : 105
    Win 10 Pro
       #1

    How to find files whose paths are too long


    When I am backing up my computer's files to another drive, I get a message stating that some of my files' paths are too long to copy. But it doesn't tell me where the files are, or I would fix the issue. I heard about a utility called TLPD (Too Long Paths Detector). I have a few questions:

    --Has anyone used TLPD successfully?
    --Is it safe?
    --If so, where is the best site from which to download it?
    --If TLPD is not good, do you have any other (simple, non-registry-modifying) suggestions?

    Thanks.
      My Computer


  2. Posts : 43,282
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Another - reviewed:
    Path Length Checker
      My Computers


  3. Posts : 105
    Win 10 Pro
    Thread Starter
       #3

    dalchina said:
    Another - reviewed:
    Path Length Checker
    Thanks. I'll check it out. Have you used it?
      My Computer


  4. Posts : 43,282
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

    I've tried - - simple, fairly quick..
      My Computers


  5. Posts : 1,853
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #5

    Why not just use PowerShell? It's built-in so no third-party utilities needed:
    Code:
    # Change $dump_path from example "C:\Users\user\Documents" below to wherever you want and the length up to the full filepath max. of 256 characters
    $dump_path = "C:\Users\user\Documents"
    Get-ChildItem $dump_path -Recurse | Where-Object  {$_.Name.Length -gt 100}

    For example, here's a recursive check for all filepaths longer than 100 characters in my Documents folders and subfolders:
    How to find files whose paths are too long-powershell-check_filepath_length.png

    Hope this helps...
      My Computer


  6. Posts : 840
    Windows 7
       #6

    Just to tweak @RickC's answer, you can change the last line to report the full pathname (making it easier to locate).
    Code:
    # Change $dump_path from example "C:\Users\user\Documents" below to wherever you want and the length up to the full filepath max. of 256 characters
    $dump_path = "C:\Users\user\Documents"
    Get-ChildItem $dump_path -Recurse | Where-Object  {$_.Name.Length -gt 100} | select FullName
      My Computer


  7. Posts : 1,853
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #7

    garlin said:
    Just to tweak @RickC's answer, you can change the last line to report the full pathname (making it easier to locate).
    Code:
    # Change $dump_path from example "C:\Users\user\Documents" below to wherever you want and the length up to the full filepath max. of 256 characters
    $dump_path = "C:\Users\user\Documents"
    Get-ChildItem $dump_path -Recurse | Where-Object  {$_.Name.Length -gt 100} | select FullName
    That definitely looks better. Thanks, @garlin.
      My Computer


  8. Posts : 679
    Windows 10
       #8

    Hello

    Duplicate Windows update files tend to add a (1) at the end of the file name and take it over the allowed amount.
    See if you have any duplicate Windows update downloads lurking around in your file system
      My Computer


  9. Posts : 17,039
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #9

    Just to tweak @garlin's tweak to @RickC's answer, you can output the file straight to CSV if you want.
    Code:
    # Change $ExaminedPath & $OutputPath to wherever you want and change $LengthThreshold to anything up to the full filepath max. of 256 characters
    $ExaminedPath = "C:\Users\user\Documents"
    $OutputPath = "C:\Users\user\Desktop"
    $LengthThreshold = 200
    Get-ChildItem $ExaminedPath -Recurse | Where-Object  {$_.Name.Length -gt $LengthThreshold} | select Directory, FullName | Export-CSV "$OutputPath\LongFilePaths-$LengthThreshold.csv" -NoTypeInformation
    The point of including Directory in the output is merely to give me something to paste straight into File explorer's Address bar to get straight to the folders of interest where I might change filenames.


    All the best,
    Denis
      My Computer


  10. Posts : 3
    W10 64 Pro
       #10

    Output Filename?


    Try3 said:
    Just to tweak @garlin's tweak to @RickC's answer, you can output the file straight to CSV if you want.
    How do I specify the output filename?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:59.
Find Us




Windows 10 Forums