Der Rest steht in der Hilfe, wie oben geschrieben
Code: Alles auswählen
Procedure.s GetSpecialFolderPath(CSIDL.l)
Protected Path.s = Space(#MAX_PATH * SizeOf(Character))
Protected Library = OpenLibrary(#PB_Any, "shell32.dll")
If Library
CompilerIf #PB_Compiler_Unicode
CallFunctionFast(GetFunction(Library,"SHGetSpecialFolderPathW"), 0, @Path, CSIDL, 0)
CompilerElse
CallFunctionFast(GetFunction(Library,"SHGetSpecialFolderPathA"), 0, @Path, CSIDL, 0)
CompilerEndIf
CloseLibrary(Library)
EndIf
If Right(Path, 1) <> "\" : Path + "\" : EndIf
ProcedureReturn Path
EndProcedure
Define.s Directory = GetSpecialFolderPath(#CSIDL_PERSONAL)
If ExamineDirectory(0, Directory, "*.*")
While NextDirectoryEntry(0)
If DirectoryEntryType(0) = #PB_DirectoryEntry_Directory
If DirectoryEntryName(0) <> "." And DirectoryEntryName(0) <> ".."
Debug DirectoryEntryName(0)
EndIf
EndIf
Wend
FinishDirectory(0)
EndIf
Listet im Debbuger alle Ordner von "Eigene Dateien" auf
Kannst Directory auch auf "C:" ändern, dann brauchste die obere Procedure nicht, steht aber fast 1:1 in der Hilfe, das Beispiel