| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | ffind = del |
Hi mark.
02-Jun-03 11:54:40, mark lewis wrote to Renato Zambon
with these changes it should run a lot faster on big lists.
ml> === snip ===
ml> {at}echo off
setlocal
ml> set lstname=deleta.lst
ml> set logname=deleta.log
ml> echo. >>> %logname%
ml> echo ---------- %_DOW %_date, FTSCHATCH Process >> %logname%
ml> echo %_TIME% DELETION: Starting process... >> %logname%
ml> if not exist %lstname% goto error1
ml> set linecnt=%{at}lines[%lstname%]
ml> if %linecnt% EQ -1 goto error2
ml> iff %linecnt% EQ 0 then
ml> echo %_TIME% DELETION: Attempting to delete 1 file. >> %logname%
ml> else
ml> echo %_TIME% DELETION: Attempting to delete %{at}inc[%linecnt%] files.
ml> >> %logname
ml> endiff
ml> set curline=0
for x in ({at}%lstname%) do gosub loop
goto loop_done
ml> :loop
set hfname=%x
ml> set curline=%{at}inc[%curline%]
ml> iff exist %hfname% then
ml> echos %_TIME% DELETION: Deleting %hfname% >> %logname%
del /q %hfname% >&> %logname%
echo. >> %logname%
ml> else
ml> echo ! %_TIME% DELETION: %hfname% not found! >> %logname%
ml> endiff
return
:loop_done
ml> echos %_TIME% DELETION: Removing input file %lstname% >> %logname%
del /q %lstname% >&> %logname%
echo. >> %logname%
ml> goto end
ml> :error1
ml> echo ! %_TIME% DELETION: %lstame% not found! >> %logname%
ml> goto end
ml> :error2
ml> echo ! %_TIME% DELETION: %lstame% is an empty file! >> %logname%
ml> goto end
ml> :end
ml> echo %_TIME% DELETION: Process complete. >> %logname%
ml> )\/(ark
-=> Bye <=-
---
(3:640/1042)
* Origin: You think "I'm no fool!" but I am! - Spike MilliganSEEN-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™.