How to skip files in a fileset?

Oct 20, 2017
28
0
Netherlands
I know that I can skip lines at the beginning of a FILE before parsing the remainder of the FILE with:
Code:
FOR /F "skip=1000" %i IN (fileset.txt) ...
The fileset.txt FILE contains a list of filenames, created earlier with a DO- or FOR-loop.

Instead of using a FILE, can skipping files be done directly within a FILESET?
Code:
DO i IN /S *.* ...
or
Code:
FOR /R %i IN (*.*) ...
 
May 20, 2008
10,575
78
Syracuse, NY, USA
You just want to skip the first 1000 matches?

Code:
set n=0
do file in /s *
    set n=%@inc[%n]
    if n le 1000 iterate

    rem Do stuff ...
enddo
Or even :-)
Code:
do file in /s *
    if %_do_loop le 1000 iterate
    rem Do stuff
enddo

You can build any test into the body of DO or FOR ... with wildcards or regexes
Code:
do f in *
    if %@wild[%f,*.bat] == 1 iterate
    if %@regex[.*\.bat,%f] == 1 iterate
    rem Do stuff
enddo

I'm pretty sure you cannot use the fileset to exclude anything.