How can I search for long filenames?


  1. Posts : 513
    Windows 7 Ultimate 64-bit
       #1

    How can I search for long filenames?


    I was copying 200 GB of data (I am writing the amount of data because I want to emphasize that I don't want to go through copying them again. And most of these files are so much less than 1 MB which makes copying process much more slower).
    27 files (1 gave warning and at the bottom it said "do this for all conflicts - 26 found) gave a warning of "file name is too long".
    I chose skip.
    Now, how can I find these 27 files?
      My Computer


  2. NoN
    Posts : 4,166
    Windows 7 Professional SP1 - x64 [Non-UEFI Boot]
       #2

    I'm afraid some of you files will have to be renamed.

    PRB: Path Limit Is 260 Bytes, Not Characters

    In Windows 7 SP1 some of those issues had been fixed normally but i do not know exactly if the numbers of bytes have really increase.

    If you decided to "skip" then you'll find your files again in the drive, which where your data are.
    Last edited by NoN; 18 May 2011 at 14:36. Reason: correcting typo
      My Computer


  3. Posts : 1,814
    XP / Win7 x64 Pro
       #3

    Found this online. I can't vouch for it as I haven't tried it but it looks like it would work.

    Make a new text file somewhere and put the code below into it. Make changes to the bold text accordingly, save and close it, then rename it to something ending in ".bat". Then, right click, run as admin, and see if it works.

    Code:
    @echo off 
    setlocal EnableDelayedExpansion  
    
    REM  loop over all files in the cwd 
    for /f %%a in ('dir C:\Users\You\Folder\ /B') do (    
    REM  store this filename in a variable so we can do substringing    
    set ThisFileName=%%a    
    REM  now take a substring    
    set ThisShortFileName=!ThisFileName:~0,255!    
    REM  finally, the rename:    
    echo ren %%a !ThisShortFileName! )   
    
    :EOF 
    endlocal
      My Computer


  4. Posts : 2,752
    Windows 7 Pro x64 (1), Win7 Pro X64 (2)
       #4

    IMAyNeed said:
    27 files (1 gave warning and at the bottom it said "do this for all conflicts - 26 found) gave a warning of "file name is too long".
    I chose skip.
    Now, how can I find these 27 files?
    Download and install a product named "Beyond Compare". Free 30-day trial, but I'm sure you'll purchase it because it's really so terribly useful for so many things you often do (e.g. sync music files from your PC music collection to your portable music player, etc.).

    One of its functions is "folder compare", presented visually in two panes, left side and right side. By specifying the high-level folder (or drive?) for your source and destinations from your copy process, it will compare all of the folders and files under that high-level designation. All differences will be identified... although you'll have to "expand" the highlighted folders to keep seeing the lower-level differences, until you can actually see the file mismatches once you get down to the true low-level folder that had the difference on left and right side.

    You can present things either in (a) show me everything, including highlighting the differences) mode, or (b) show me only those folders which have differences.

    In your case, your 27 files that did not get copied from source to destination will eventually be shown (once you expand all of the enclosing higher-level parent folders involved). You can then choose to do whatever you want... e.g. right click and choose "copy from left to right" if your source pane is on the left and target pane is on the right". I suspect the too-long file name issue will produce a popup here as well, and you will be offered an opportunity to rename it before copying so as to be acceptable.

    This "folder compare" function is just one of MANY things you can do with Beyond Compare.
      My Computer


  5. Posts : 513
    Windows 7 Ultimate 64-bit
    Thread Starter
       #5

    Thanks!
      My Computer


  6. Posts : 934
    Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
       #6

    IMAyNeed, there is a Free alternative to Beyond Compare.
    It is less sophisticated, but it is open source.

      My Computer


  7. Posts : 513
    Windows 7 Ultimate 64-bit
    Thread Starter
       #7

    Thank you so much for the link Neutron16!
      My Computer


 

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

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