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,954 of 42,547    |
|    Fin Tres Nueve Dos to All    |
|    Re: [solved] Re: select the newest file     |
|    27 May 21 22:41:06    |
   
   From: fin392@gmail.com   
      
   El jueves, 27 de mayo de 2021 a las 9:34:21 UTC+2, Ammammata escribió:   
   > Il giorno Thu 27 May 2021 09:27:32a, *Ammammata* ha inviato su    
   > alt.msdos.batch il messaggio    
   > news:XnsAD37603B620A7am...@127.0.0.1. Vediamo cosa ha    
   > scritto:    
   >    
   > > I'd like to locate the newest file in a folder    
   >    
   > I reply to myself :/    
   >    
   > for /f %%i in ('dir /b/a-d/od/t:c') do set LAST=%%i    
   > echo The most recently created file is %LAST%   
   > --    
   > /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\    
   > -=- -=- -=- -=- -=- -=- -=- -=- - -=-    
   > ........... [ al lavoro ] ...........   
      
   for /f "tokens=*" %a in ('dir "\\192.168.1.4\backup\server\data\*.*" /b /o-d')   
   do @set LastFile=%~fa   
      
   echo %LastFile%   
      
   --- 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