View other drives
View other drives
I want to look at the files on my phone, but I can't see how to view any other drives but the main one. Am I missing something?
-
- Legend
- Posts: 2110
- Joined: Thu Jul 23, 2020 5:20 pm
- Location: Isle of Wight
Re: View other drives
What with ?
FileChooser.class ?
Did you set FileChooser.Root to "/" or to a folder?
If .Root property is / you should be able to see everything the system can.
If .Root property is set to a folder you can only see from that folder.
Maybe it's that?
FileChooser.class ?
Did you set FileChooser.Root to "/" or to a folder?
If .Root property is / you should be able to see everything the system can.
If .Root property is set to a folder you can only see from that folder.
Maybe it's that?
Re: View other drives
Good point, I had not thought of that, but it still doesn't work for me.


-
- Legend
- Posts: 2110
- Joined: Thu Jul 23, 2020 5:20 pm
- Location: Isle of Wight
Re: View other drives
is it in the media folder?
Dim sPath As String = "/run/media" &/ User.Name ' Os's like Fedora use /run/media
If Not Exist(sPath) Then sPath = "/media" &/ User.Name ' others use /media
FileChooser1.Root = sPath
- Quincunxian
- Regular
- Posts: 199
- Joined: Sun Jun 25, 2017 12:14 am
- Location: Western Australia
- Contact:
Re: View other drives
I'm on Mint so may be different but:
/dev/disk/by-label
gets me all the installed disks I have with their label apart from the primary drive.
/dev/disk/by-label
gets me all the installed disks I have with their label apart from the primary drive.
Cheers - Quin.
I code therefore I am
I code therefore I am
Re: View other drives
Thanks guys but no joy. I can't find the directories "/run/media" or "/dev/disk/by-label" and "/media" &/ "User.Name" is empty. I am using Mint 22 and I think the files are in "/dev/disk/by-id", see list below (my phone is not listed!), but I can't read them and, looking at the file names, there seems to be a lot of duplication. I've done some searching, but I am unable to find a command that will give me a simple list of devices with their names. Then, how to access a drive? I didn't think it was going to be this complicated. 
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part1
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part2
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part3
/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4XBNZFN401278Y
/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4XBNZFN401278Y-part1
/dev/disk/by-id/ata-V_Series_SATA_SSD_120GB_224710893500357
/dev/disk/by-id/ata-V_Series_SATA_SSD_120GB_224710893500357-part1
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a4959842d
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a4959842d-part1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713_1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713_1-part1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713-part1
/dev/disk/by-id/usb-USB2.0_External_Mass_Storage_Device_0010101640100D695
/dev/disk/by-id/wwn-0x5000cca35ed83bce
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part1
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part2
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part3
/dev/disk/by-id/wwn-0x5002538ed04ec5f5
/dev/disk/by-id/wwn-0x5002538ed04ec5f5-part1
/dev/disk/by-id/wwn-0x5000000000000000
/dev/disk/by-id/wwn-0x5000000000000000-part1

/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part1
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part2
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part3
/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4XBNZFN401278Y
/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4XBNZFN401278Y-part1
/dev/disk/by-id/ata-V_Series_SATA_SSD_120GB_224710893500357
/dev/disk/by-id/ata-V_Series_SATA_SSD_120GB_224710893500357-part1
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a4959842d
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a4959842d-part1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713_1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713_1-part1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713-part1
/dev/disk/by-id/usb-USB2.0_External_Mass_Storage_Device_0010101640100D695
/dev/disk/by-id/wwn-0x5000cca35ed83bce
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part1
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part2
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part3
/dev/disk/by-id/wwn-0x5002538ed04ec5f5
/dev/disk/by-id/wwn-0x5002538ed04ec5f5-part1
/dev/disk/by-id/wwn-0x5000000000000000
/dev/disk/by-id/wwn-0x5000000000000000-part1
-
- Legend
- Posts: 2110
- Joined: Thu Jul 23, 2020 5:20 pm
- Location: Isle of Wight
Re: View other drives
Hmm, does your code have "User.Name" (with quotes) like your example or just User.Name
cause I'm using mint and it has always used "/media" &/ User.Name
FileChooser1.Root = "/media" &/ User.Name
what does your file browser show is in /media/ ?
cause I'm using mint and it has always used "/media" &/ User.Name
FileChooser1.Root = "/media" &/ User.Name
what does your file browser show is in /media/ ?
-
- Legend
- Posts: 2110
- Joined: Thu Jul 23, 2020 5:20 pm
- Location: Isle of Wight
Re: View other drives
lsblk -o "MOUNTPOINT"| grep /
should list all mounted disks
should list all mounted disks
Re: View other drives
Opps. This was a typing mistake when writing the post, the code was correct.Hmm, does your code have "User.Name" (with quotes) like your example or just User.Name
I have looked at this on 2 computers, just to make sure, both running Mint 22 and this is what shows, including hidden files.cause I'm using mint and it has always used "/media" &/ User.Name

what does your file browser show is in /media/ ?

lsblk -o "MOUNTPOINT"| grep /
should list all mounted disks

The file browser, Nemo, shows my phone's Music folder as "mtp://HMD_Global_Nokia_X30_5G_H1X9FI1AL03B0800099/Internal shared storage/Music/" (With or without %20s for spaces) but Gambas does not want to Dir() that folder either.

-
- Legend
- Posts: 2110
- Joined: Thu Jul 23, 2020 5:20 pm
- Location: Isle of Wight
Re: View other drives
eew , that's wierd..
maybe like this...
maybe like this...
$ ls /run/user/1000/gvfs/
'mtp:host=Google_Pixel_8a_43221JEKB18852'
$ ls "/run/user/1000/gvfs/mtp:host=Google_Pixel_8a_43221JEKB18852"/
'Internal shared storage'
$ ls "/run/user/1000/gvfs/mtp:host=Google_Pixel_8a_43221JEKB18852/Internal shared storage"/
Alarms Audiobooks Documents Movies 'Music (1)' Notifications Podcasts Ringtones
Android DCIM Download Music Pictures Recordings