| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | The reason for this eecchhoo... |
Hi Bruce.
06-Mar-03 20:35:00, Bruce Howells wrote to All
BH> Howdy All, here's a little BATCH that I put to_get_her recently.
interesting,
I found 2 ways to use fewer lines and fewer variables.
:: nextnum.bat ::
{at}if (%9)==() goto Begin
set t=%1
shift
set v=%1
:Inc
shift
if not %1==%t% goto Inc
set %v%=%2
if not (%2)==(0) goto End
if (%5)==() goto End
%m% %3 %4 0 1 2 3 4 5 6 7 8 9 0 %5 %6
:Begin
{at}echo off
set f=packet.
set m=%0
for %%n in (0 1 2 3 4 5 6 7 8 9) do if exist %f%%%n?? set a=%%n
for %%n in (0 1 2 3 4 5 6 7 8 9) do if exist %f%%a%%%n? set b=%%n
for %%n in (0 1 2 3 4 5 6 7 8 9) do if exist %f%%a%%b%%%n set c=%%n
%m% %c% c 0 1 2 3 4 5 6 7 8 9 0 %b% b %a% a
:end
echo Next filename %f%%a%%b%%c%
for %%v in (a b c f m t v) do set %%v=
:: EOF ::
-=> Bye <=-
---
* Origin: How to make Kleenex dance? Blow a little boogie in it. (3:640/1042)SEEN-BY: 633/267 270 @PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.