DOS Batch File Scripting

MarineBoy

Registered
Messages
1
Just thought I'd say 'Hello' and get over the 'zero posts' hurdle.

One topic that is dear to me is that of Windos (sic) Batch File Scripting.

There's a lot that can be done with DOS commands since Windows 2000 onwards.

For example, did you ever want to automatically use a series of numbers - maybe filenames - starting from 00 to 99?

:: ===== Start ==========
:: Note - remove next @echo line if you want to debug your script
@echo off
For /l %%A in (0,1,9) do (
For /l %%B in (0,1,9) do (
@echo %%A%%B
)
)
:: ======= End =========

So that would be the contents of a batch file to echo just such a list to the screen. (Note that the batch script file has to be named - 'something.bat' or 'something.cmd')

For some of you this is all 'old' knowledge - but I know that a lot of people 'think' they know DOS when they really mean the old version 6.22 as opposed to the latest DOS. As an example, those people can try typing the following in a DOS prompt:
for /?
to see how powerful the new command suite can be.

TTFN

~O~
p.s. This is a GREAT looking forum - congratulations to the makers!
 
Last edited:
Top