Article View: comp.lang.basic.visual
Article #162Re: Directory Recursion
From: James Spate
Date: Sun, 21 Mar 1999 00:00
Date: Sun, 21 Mar 1999 00:00
37 lines
1809 bytes
1809 bytes
Pet hates...
When you declare any variable declare it explicitly,
Private Sub GetDirInfo(Path as String)
'OK declareing multiple variable on on line is a pet hate
Dim Name as String, Response as String
Another pet hate, use Dir$, Format$, Left$, etc$ when your working with
strings, they work faster when you compile the program.
Anyhow,
Private Sub GetDirInfo(Path as String)
Dim strDirName as string
'Get the first directory
strDirName = Dir$(Path, vbDirectory)
Do Until strTemp=""
If strDirName <> "." And strDirName <> ".." Then
If (GetAttr(Path & strDirName) And vbDirectory) = vbDirectory
Then
Path = Path & strDirName & "\"
Debug.Print Path
GetDirInfo (Path)
End If
End If
Name = Dir$()
Loop
End Sub
Technical Details
Message-ID:
<7d2ugf$333$1@news-2.news.gte.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<BK%I2.4513$WM.1120@news.rdc1.wa.home.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fbd17,fcc273081167e07e X-Google-Attributes: gidfbd17,public X-Google-Thread: f645d,fcc273081167e07e X-Google-Attributes: gidf645d,public X-Google-Thread: 107824,fcc273081167e07e X-Google-Attributes: gid107824,public X-Google-Thread: 108062,fcc273081167e07e X-Google-Attributes: gid108062,public X-Google-Thread: 1143a7,fcc273081167e07e X-Google-Attributes: gid1143a7,public From: "James Spate" <james.spate@gte.net> Subject: Re: Directory Recursion Date: 1999/03/21 Message-ID: <7d2ugf$333$1@news-2.news.gte.net> X-Deja-AN: 457212903 References: <BK%I2.4513$WM.1120@news.rdc1.wa.home.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: gte.net X-Auth: D414C3471480D3C413938491 Newsgroups: comp.lang.basic.visual,comp.lang.basic.visual.database,cz.comp.lang.basic.visual,fj.comp.lang.visualbasic,microsoft.public.vstudio.development