TIP: Click on subject to list as thread! ANSI
echo: z3_pascal
to: Ian Smith
from: Doug Brendish
date: 1996-03-13 20:49:44
subject: Making directories

IS> Hiya Doug,

DB>> This is how I would probably do it. Well there may be
DB>> better ways, but this would probably be fairly thorough in
DB>> getting rid of the files and any sub dirs in the work dir
DB>> too. I have not tested it!! I only just wrote it up just
DB>> then as an example, so there may be errors.

IS> Looks pretty neat, I'll add it to my snippets file if you'll 
IS> finish it :)  Only obvious things to me without trying it 
IS> are:

I'll make it into a unit of sorts for you if you really want it.

DB>> Uses DOS;

IS> { needs a forward declaration of procedure Del_Work here, as 
IS> Prune uses it, and it uses Prune - say: }
See, said there may be some mistakes!! That call to Del_Work should be a
call to prune again.. Whoops..

IS> Procedure Del_Work (P : DirStr); forward;
When the wrong call is replaced with prune it doesn't need a forward dec.

DB>> Procedure Prune(P); {Recursive file + dir delete}

IS> Procedure Prune (P : DirStr);  { string, if ya druther - 
IS> something, though }

DB>> Var Path:string;
DB>>     SR:Searchrec;
DB>>     F:File;
IS>          Err : boolean;  { :) }
Err, umm:integer;

IS> [...]

DB>> Procedure Del_Work(P);

IS> Procedure Del_Work (P : DirStr); { .. }

IS> [...]

DB>> I also don't
DB>> have Delphi(Not till they make it for OS/2) so this is DOS.

IS> I wouldn't hold your breath, though it would be nice if 
IS> someone did at least a bit of a port, or added some 
IS> units/whatever to provide access to OS/2 stuff ..
No I don't think there is much chance either, but Speed Pascal is
attempting to be Delphi compat. The source with it even has some "if
define windows" in it. There is still a few bugs in it but it has come
a long way from the first ver I saw. If the next version(Could be a
release) has as many improvements as this ver over the one before it could
be a good package.

IS> BTW, I've got those patches here to BP7 to make it work with 
IS> OS/2.  Only 16 bit, but it beats running it under DOS, I'm 
IS> told .. waiting to find out ..
Got those too, but don't have Borland Pascal to try it out on.


Doug.

--- Msgedsq/2 3.10
* Origin: Tir na nOc 066 245944 -=Cead mile failte=- (3:626/667)
SEEN-BY: 633/267 270
@PATH: 626/667 660 711/401 808 50/99 635/544 727 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™.