Getcurrentdrive()
it is true that you can go to it with coding but in this way it is much faster
Thank you
I apologize for posting this in the wrong section

Code: Select all
Debug Left(GetCurrentDirectory(),2) ; Returns "C:"
Code: Select all
Enumeration
#DriveWindow
EndEnumeration
Enumeration
#DrivesList
EndEnumeration
Procedure.s GetDrives()
DriveName$=Space(#MAX_PATH)
OpenWindow(#DriveWindow, 10, 10, 232, 120, "Get Drives", #PB_Window_ScreenCentered|#PB_Window_SystemMenu)
ListIconGadget(#DrivesList, 0, 0, WindowWidth(#DriveWindow), WindowHeight(#DriveWindow), "Drive", 64)
AddGadgetColumn(#DrivesList, 1, "Name", 128)
j=0
For i=65 To 90
Dir.s=Chr(i)+":\"
If FileSize(dir)=-2
GetVolumeInformation_(Dir,@DriveName$,255,0,0,0,0,255)
AddGadgetItem(#DrivesList, -1, Dir+Chr(10)+DriveName$)
AddKeyboardShortcut(#DriveWindow, i, i)
L=Len(DriveName$)
If L>LL
LL=L
EndIf
EndIf
Next
Repeat
Event=WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver
EndProcedure
GetDrives()
Yes some sort of code like the ones do ye have posted
Code: Select all
For Drive = 'A' To 'Z' ; infratec Oct 2019
Dir = ExamineDirectory(#PB_Any, Chr(Drive) + ":/", "*")
If Dir
Debug Chr(Drive)
FinishDirectory(Dir)
EndIf
Next Drive