|
1 members (Russ),
10,950
guests, and
1,516
robots. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
S |
M |
T |
W |
T |
F |
S |
|
|
|
1
|
2
|
3
|
4
|
5
|
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|
This is another custom island. This one could be used for ads. This spot is one of the best places for ads on your site to be placed. This can be enabled/disabled on a per forum basis.
|
|
|
|
Joined: Dec 1999
Posts: 30,868
Master Elite Member
|
Public Function AsStringArray_SubFolders(ByVal FolderSpec As String) As String()
'Purpose
' Used to get a list of folders in a specified folder.
'Return (String())
' Returns a list of all folders that exist in the specified folder.
'Version History
' 1.0 12/15/2005 Tested by Russ Tanner
'---
'Initiate variables
Dim X As String 'general buffer to store the current folder or file name in the loop
Dim C As Long 'tracks the total number of elements in the return buffer
Dim R() As String 'return buffer
'Make sure FolderSpec ends with a backslash
If Right(FolderSpec, 1) <> "\" Then FolderSpec = FolderSpec & "\"
'Loop through all folders in the "DB" folder
X = Dir(FolderSpec, vbDirectory) 'get the first folder
Do While X <> ""
'Ignore the current and parent folders
If X <> "." And X <> ".." Then
'Test to make sure it's a folder
If (GetAttr(FolderSpec & "\" & X) And vbDirectory) = vbDirectory Then
'Add the folder to the return buffer
ReDim Preserve R(C)
R(C) = X
'Increment the return buffer element pointer
C = C + 1
End If
End If
X = Dir
Loop
'Return the result
AsStringArray_SubFolders = R
End Function
|
|
|
|
|