home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 41,086 of 42,547   
   B00ze/Empire to Marcel Verduyn   
   Re: finding out length of directories   
   19 Jan 15 20:30:32   
   
   From: B00ze64@hotmail.com   
      
   On 2015-01-18 13:58, Marcel Verduyn  wrote:   
      
   > Hello,   
   > using Explorer I started to make a backup but it did not complete because   
   one of the directory names was too long. Unfortunately, I do not know which   
   directory name was too long...   
   > Is there an MSDOS command or a batch file to find out which directory   
   exceeds a certain length before making a backup?   
   > Kind regards,   
   >     Marcel   
   >   
      
   Someone posted the following a while back, it will tell you which PATHS   
   are too long. Create a CMD/BAT file with this, make sure it's in your   
   PATH then run it from the root of the drive you want to check:   
      
   @echo off   
   REM Scans for pathnames longer than ~255 which Explorer cannot copy   
   REM Works off the current folder downwards...   
   setlocal EnableDelayedExpansion   
   for /R %%a in (*) do (   
      set name=%cd%%%a   
      if not "!name:~253,1!"=="" echo Excessively long name: %%a   
   )   
   endlocal   
      
   Regards,   
      
   --   
   ! _\|/_  Sylvain / B00ze64@hotmail.com   
   ! (o o)   Member-+-David-Suzuki-Foundation/EFF/Planetary-Society-+-   
   oO-( )-Oo  Windows error 09 Bug encounterd, God knows what happened.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca