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,523 of 68,980    |
|    JJ to Harry Potter    |
|    Re: WIn10/64: excluding files in for?    |
|    05 May 20 11:14:13    |
      From: jj4public@vfemail.net              On Mon, 4 May 2020 10:27:21 -0700 (PDT), Harry Potter wrote:       > Hi! I want to batch-compress a group of .2mg files using WinMount and the       > for command and exclude certain files. The files to exclude have a       > *dk?.2mg file name. How do I process the files and exclude the files to       > exclude?              Use this.              @echo off       setlocal enabledelayedexpansion       for %%F in (*.2mg) do (        set fn=%%~nxF        set ok=1        for %%X in (*dk?.2mg) do (        if /i "%%~nxX" == "!fn!" set ok=0        )        if !ok! == 1 (        rem process the file...        )       )              --- 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