Article View: demon.ip.developers
Article #1046Re: findfirst() / _dos_findfirst()
From: Brian {Hamilton Kelly}
Date: Fri, 10 May 1996 00:00
Date: Fri, 10 May 1996 00:00
20 lines
1581 bytes
1581 bytes
In article <831671370snz@pdlmail.demon.co.uk>
pete@pdlmail.demon.co.uk "Peter Disdale" writes:
> One word of warning matching subdirectory entries (to avoid the
> pitfall I fell headlong into many years back) - watch out for
> '.' and '..' which you will get handed to you in every subdir.
> Way back I wrote a PURGE.EXE to wipe out a whole directory
> tree (deltree didn't exist then...) - and such a utility lends
> itself well to recursion. It does, but not if one blindly
> chdir's to any directory match by a DOS findfirst/next - one's
> stack explodes at the first '.' !
Think yourself lucky that that result saved you from the even worse
consequences had the program gone on to follow the '..' path <g>
--
Brian {Hamilton Kelly} bhk@dsl.co.uk
"A language is a dialect that has an army and a navy"
-- Samuel Johnson
Technical Details
Message-ID:
<831724376snz@dsl.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<831575697snz@wash.demon.co.uk> <831588719snz@pdlmail.demon.co.uk> <831609093snz@siberia.demon.co.uk> <831671370snz@pdlmail.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,eea2e7ecc42db8da
X-Google-Attributes: gid10bb05,public
From: Brian {Hamilton Kelly} <bhk@dsl.co.uk>
Subject: Re: findfirst() / _dos_findfirst()
Date: 1996/05/10
Message-ID: <831724376snz@dsl.co.uk>
X-Deja-AN: 154920664
x-mail2news-path: dragnhll.demon.co.uk
x-nntp-posting-host: dragnhll.demon.co.uk
references: <831575697snz@wash.demon.co.uk> <831588719snz@pdlmail.demon.co.uk> <831609093snz@siberia.demon.co.uk> <831671370snz@pdlmail.demon.co.uk>
organization: Dragonhill Systems Ltd
newsgroups: demon.ip.developers