Numlist.btm - Create a numbered list template


Staff member
May 16, 2008
Migrated From JP Software Wiki

Numlist.btm is used to create a numbered list template in a file. Its main use is for repetitive commands or lines of HTML code involving numeric sequences, or sequentially numbered files. After the template is created, replace zzz<space> with one set of text and <space>xxx with another.

Usage: numlist start_number end_number output_filename

Example use

For example, numlist 10 14 tempname.bat will create the following:

zzz 10 xxx
zzz 11 xxx
zzz 12 xxx
zzz 13 xxx
zzz 14 xxx

Then replace "zzz<space>" with "Copy sample.html Chapter_" and "<space>xxx" with ".html":

Copy sample.html Chapter_10.html
Copy sample.html Chapter_11.html
Copy sample.html Chapter_12.html
Copy sample.html Chapter_13.html
Copy sample.html Chapter_14.html

Script code

: numlist.btm
: by Joseph "Rick" Reinckens
: creates a template with lines containing sequential numbers
: replace zzz and xxx with commands, HTML code, etc.

@echo off
: Create a numbered list from %1 to %2 in output file %3

DO m = %1 to %2
  echo zzz %m xxx>>%3

Similar threads