home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 March
/
CHIPCD_3_98.iso
/
software
/
share
/
sharmies
/
unixdos
/
data.z
/
test_lst.bat
< prev
next >
Wrap
DOS Batch File
|
1997-11-18
|
640b
|
28 lines
@echo off
rem *** DEFINE WORKFILE AND STARTING LINE NUMBER ***
set LINE=1
set LST=list.tmp
ls > %LST%
rem *** FILL FILE LIST ***
:LOOP
rem *** GET NEXT LINE ****
getlines %LINE% %LINE% %LST% > name.tmp
if errorlevel 1 goto END
rem *** MAKE EXTRACTED FILENAME AN ENV VARIABLE ******
call setenv "NAME=@name.tmp"
rem *** THIS IS JUST FOR INFORMATION AND CAN BE REMOVED ***
echo %LST% LINE %LINE% = %NAME%
rem ****** YOUR PROGRAM/BATCH HERE *******************
rem ****** COMPUTE NEXT LINE NUMBER ***
call setenv "LINE=`expr $LINE + 1`"
goto LOOP
:END
del name.tmp