Michael wrote:
>I must have released something terrible. No one have reported if 1.65 for
>DOS installs and works ok, or not! ;-)
Hmm... looks like you have... (sorry, I should have remembered this when
you told me you were going to change this).
Clr.Bat:
@echo off
rem usage: clrcache.bat (cache.idx) (cache path) (TEMP path) (filemask)
rem I guess those "DOS forever!" freaks among Arachne users will like this ;)
if exist %1 del %1
if exist %2*.??? del %2*.???
if exist %2headers\*.??? del %2headers\*.???
if exist %3$ROURA$.BAT copy %3$ROURA$.BAT bat.tmp>NUL
if exist %3*.??? del %3*.???
if exist bat.tmp copy bat.tmp %3$ROURA$.BAT>NUL
if exist bat.tmp del bat.tmp
First off %3 is "cache\" for me - not c:\temp so %3 was changed into %temp%
(but must be defined through %3 in the future so that temp or arachnetemp
can be used.
Secondly why not use "*.*" instead of "*.???" ? (this doesn't really matter)
>From MS-DOS 5.0 "del *.*" (and the like such as "*.???") will ask the user
to confirm this (IIRC Clarence doesn't like this and will have a field day
now when we who use latter versions get into trouble <g>).
Anyway by forcing the answer (add "Echo Y|" for english, "Echo J|" for
swedish and probably many more exist infront of "del") we can fix this, but
it isn't a good sollution. DelTree has /y that will remove without asking
but del doesn't have one like that and we can't switch to deltree either
since not everyone has it. (There's a freeware deltree.com that we could
add to Arachne if we want to complicate things even more).
But all this is unimportant since you have made the BATch file recursive
Michael... (If we change %3 into %temp% or %arachnetemp% depending on your
settings)
This is what happens in that case:
1. Arachne creates c:\temp\$roura$.bat
2. Arachne "runs" the file
3. As the first line in the $roura$.bat file we call clr.bat
4. Upon exit clr.bat will remove and recreate $roura$.bat - and thereby DOS
looses the pointer where it was and starts over on line 3 in the file
$roura$.bat again and calls clr.bat - and so on and so on...
Now this can be solved if we use the information contained in the file
batvirus.all where the virus wouldn't screw up like this - but it's IMHO
way to complicated (we also really on find) to be a good idea.
So for now the best you can do is this (change Y into the correct answer
for your language). The extra "echo Y|" there (for "del %1") is for 4DOS -
IIRC it can be made into always asking if you want, otherwise it's
unimportant.
@echo off
rem usage: clrcache.bat (cache.idx) (cache path) (TEMP path) (filemask)
rem I guess those "DOS forever!" freaks among Arachne users will like this ;)
if exist %1 echo Y|del %1
if exist %2*.??? echo Y|del %2*.???
if exist %2headers\*.??? echo Y|del %2headers\*.???
As you can guess Michael this freak doesn't like it as it is...