1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Numlist.btm - Create a numbered list template

Discussion in 'T&T - Scripting' started by nchernoff, Jun 4, 2008.

  1. nchernoff

    nchernoff Administrator
    Staff Member

    May 16, 2008
    Likes Received:
    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

Share This Page