Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Volume label
#1
Hi,
I would like to do the following:
When I start my search program for prayer cards,
the system looks immediately for availability of the data on the server.
That works fine. If the server is not available, nothing happens, user has to wait.

But I can attach an external SSD to the search PC, that also has some data.
If the server is not available but the SSD is, i would like the program to find the SSD.
What is my question?
I cannot predict what disk letter the ssd will be at : F:\, G:\ ... ?
What i can do is make sure it has a specific volume label : eg. 'myVolume5'.
What I need is a piece of code that searches for the volume label and tells me what the drive letter is.
I was hoping that this would do the trick, but it doesn't:
if psutil.disk_partitions()[0].opts[0] == label:
                return partition.mountpoint 
Any ideas ?
thx,
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
Volume label - by DPaul - Apr-22-2024, 03:10 PM
RE: Volume label - by DPaul - Apr-23-2024, 02:23 PM
RE: Volume label - by SandraYokum - Apr-24-2024, 01:07 PM
RE: Volume label - by DPaul - Apr-24-2024, 03:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Ideas for determine the volume of rotating object Lardos 2 2,573 Apr-05-2019, 04:47 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020