FoldersIn

Returns list of folders found in given folder in a string in ANStr format, similar to FilesIn, but this one is for folders
Can pass either mapped path or unmapped path, not both

CodeFunctionName
What is this?

Public

Tested

Original Work
Function FoldersIn(Path_MapPathed, Path_UnMapPathed, Sepa)
Rett = ""
ServerFolder = ""
If Path_MapPathed > "" And Path_UnMapPathed = "" Then
ServerFolder = Path_MapPathed
ElseIf Path_MapPathed = "" And Path_UnMapPathed > "" Then
ServerFolder = Server.MapPath(Path_UnMapPathed)
End If
If ServerFolder = "" Then Exit Function
If Sepa = "" then Sepa = "|"
dim fo,x
' Set fso = CreateObject("Scripting.FileSystemObject")
Set fo = fso.GetFolder(ServerFolder)
For each x in fo.subfolders
If Rett > "" then Rett = Rett & Sepa
Rett = Rett & x.Name
Next
Set fo = nothing
FoldersIn = Rett
End Function

Path_MapPathed, Path_UnMapPathed, Sepa

Views 4,716

Downloads 1,440

CodeID
DB ID