Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,518 of 68,980    |
|    dr.j.r.stockton@gmail.com to All    |
|    Re: Command line 7-Zip question - contro    |
|    30 Mar 20 09:48:51    |
      On Monday, 30 March 2020 01:28:30 UTC+1, Zaidy036 wrote:              > make a batch:       > 1. dir /B astr*.htm > file.txt       > 2. dir /B grav*.htm >> file.txt       > 3. take last file from file.txt into variable       > 4. 7Z a ASTRGRAV.ZIP %variable%       > 5. loop       > delete last file from file.txt       > If file.txt empty GOTO 6       > take last file from file.txt into variable       > 7Z add %variable% to ASTRGRAV.ZIP       > timeout xx << so you can see variable       > repeat       > 6. del file.txt and exit       >        > Alternative is let original command run and after finish open zip and        > look at list.              The following, for a different job, may be line-wrapped by News        ending/receiving : the true lines begin with FOR XCOPY REM REM ) .               FOR /F "eol=; tokens=1,2*" %%J IN (%Here%%Who4%LIST.TXT) DO         XCOPY /D /F /Y /EXCLUDE:OMIT-SET.TXT %from%%%J\%%K        %unto%%%J\ %%L 2>> %TEMP%\$LOGGIT.TXT |        find /v " File(s) copied                                                                                                                                                                                                                                                                                                                                   REM if ERRORLEVEL 1 echo Failure with %%J\%%K QUIT. & goto NOM       RE REM Above is no good;        ERRORLEVEL 1 is falsely documented                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         That reads *LIST.TXT line-by-line, and using the first 2 or 3 fields to tell       XCOPY what it needs to be told. If the first visible character of a line is a       semicolon, that like is ignored.              I could use similar to drive 7Z.EXE, but more is needed to show individual       file names, which your code already does; but I could probably put a DIR /B in       front of the 7Z ... which would replace my XCOPY ... above.              Thanks for the ideas,              --         (c) John Stockton, near London, UK. Using Google Groups. |        Mail: J.R.""""""""@physics.org - or as Reply-To, if any. |              --- 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