View other drives

Post your Gambas programming questions here.
User avatar
cogier
Site Admin
Posts: 1197
Joined: Wed Sep 21, 2016 2:22 pm
Location: Guernsey, Channel Islands

Re: View other drives

Post by cogier »

Excellent. That did it! I wrote the following code in Gambas and it worked. Thanks, Bruce.

Public Sub Form_Open()
  
'Dim sFiles As String[] = Dir("/run/user/1000/gvfs/mtp:host=Google_Pixel_8a_43221JEKB18852/Internal shared storage")
Dim sFiles As String[] = Dir("/run/user/1000/gvfs/mtp:host=HMD_Global_Nokia_X30_5G_H1X9FI1AL03B0800099/Internal shared storage/Music/")

For iLoop As Integer = 0 To sFiles.Max
    TextArea1.Text &= Format(iLoop + 1, "000") & "/. " & sFiles[iLoop] 
    If iLoop <> sFiles.max Then TextArea1.Text &= gb.NewLine
Next

End
Post Reply