|
|
pn = gp.Count
If pn = 0 Then
如果没子目录
Ppath = LCase(S)
Npath = LCase(Of.GetParentFolderName(S))
得到父目录的小写形式
T = True
Else
Npath = LCase(S)
有子目录,得到其小写形式的集合
End If
Do While Not Er
For Each pn In Of.GetFolder(Npath).SubFolders
得到子目录下的子目录
If T Then
If Ppath = LCase(pn) Then
T = False
End If
Else
Pnext = LCase(pn)
Exit Function
End If
Next
T = True
Ppath = LCase(Npath)
将字符串转化成小写
Npath = Of.GetParentFolderName(Npath)
If Of.GetFolder(Ppath).IsRootFolder Then
如果是根目录
m = Of.GetDriveName(Ppath)
就得到分区符
Pnext = Dnext(Of, m)
Exit Function
End If
Loop
End If
End Function
******************************************************************
Function Dnext(Of, S)
Dim dc, n, d, T, m
On Error Resume Next
T = False
m = ""
Set dc = Of.Drives
得到所有的驱动器盘符
For Each d In dc
遍历每个驱动器
If d.DriveType = 2 Or d.DriveType = 3 Then
如果是网络盘或本地盘
If T Then
Dnext = d
Exit Function
如果是False,就返回当前盘,并退出本函数
Else
If LCase(S) = LCase(d) Then
如果是True且盘符相同,就令T为True
T = True
End If
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] 下一页
|
|
|
|
|
|
|
|
 |
|