| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | ffind = del |
-> Small doubt: how can I delete a list of files created by ffind?
->
-> Example:
->
-> ffind /b /t"blablabla" *.ext > deleta.lst
-> del ???
->
-> (??? = list of files in deleta.lst)
The classical method for deleting a file list is to use a looping
mechanism and a postional parameter. I am not exactly sure how 4DOS
works, but in UNIX it would be something like:
# delit.sh -- file list delete
while ($1 EOF)
do
rm $1
shift
end
echo "Done."
If there is no WHILE statement, then folks usually use the "empty" error
condition, A LA --
::# DELIT -- Delete a file list.
ON %1 ERROR GOTO DONE
:LOOP
del %1
shift
goto :LOOP
:DONE
echo Done.
Of course, you can use FOR and WHILE loops to make things easier, but
that is the basics. To make it work, though, you need a "raw" file
list, no headers, no trailers, no summaries, just names and extensions.
Also, a really, really long list can "overflow" the command if there are
more file names than shell array namespace can handle, in which case you
split the file list up into pieces and run the command multiple times,
once on each smaller piece (which is usually rare).
Anyone care to provide the specifics?
Thanks In Advance
--- ViaMAIL!/WC v1.60d
* Origin: Chowdanet (401-331-0615) telnet://chowdanet.com (1:323/120)SEEN-BY: 633/267 270 @PATH: 323/120 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™.