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 40,611 of 42,547   
   foxidrive to James Shamblin   
   Re: Year Month Day Hour Minute Second   
   07 Mar 13 20:17:34   
   
   From: not@this.address.invalid   
      
   On 7/03/2013 8:09 PM, James Shamblin wrote:   
   > Hi,   
   >   
   > I have to run a file integrity checker within a Win 7 CMD box.   
   >   
   > This is done nightly right after the file generates.   
   >   
   > What I would like to do is accomplish this check with a 1 click batch file.   
   >   
   > The file looks like this:  test.test.test.20130307010139   
   >   
   > The only thing that changes is the YYYYMMDDHHMMSS   
   >   
   > My question is how do I specify YYYYMMDDHHMMSS in the batch file so it will   
   run each day when clicked?   
   >   
   > Oh, these also build up in a folder so I need to insure the latest file gets   
   checked.   
   >   
   > Thanks for any help!   
   >   
   > James   
   >   
      
   @echo off   
   for /f "delims=" %%a in ('dir "test.test.*" /b /a-d /od') do set "file=%%a"   
   :: check file integrity here with "%file%"   
   echo "%file%"   
   pause   
      
      
      
      
      
   --   
   foxi   
      
   --- 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