Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for a reliable way to determine if a drive letter is in use
#9
On Linux this is ridiculously easy:

On Debian/Ubuntu check in "/media/(user)" for additional subdirectories.

On almost other Linux OS check in "/run/media/(user)".

Use _DIREXISTS for it.

There are no drive letters to worry about. However this depends whether or not the pluggable disk was given a volume label. If not then it becomes harder to track down an UUID to identify that disk. That UUID doesn't change if the disk is plugged into a different Linux OS or a different computer into a Linux OS.

Fiddling with certain programs (which require administrative privileges anyway) could do something about it. On most systems, however, GNOME Disk Utility does not require the "root" password to delete partitions and reformat disks! Be careful out there.



What is the result of "vol F:" on the terminal on Windows?
Reply


Messages In This Thread
RE: Looking for a reliable way to determine if a drive letter is in use - by mnrvovrfc - 05-08-2023, 04:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What the heck, it's Friday let's drive some people nuts. doppler 4 1,024 10-21-2024, 11:31 AM
Last Post: SpriggsySpriggs
  _File$ is not behaving as expected, cannot determine why hanness 6 1,670 10-14-2024, 01:56 AM
Last Post: a740g
Sad Is there a way to determine screen resolution ? doppler 2 727 08-03-2023, 02:30 PM
Last Post: doppler
  Is it possible to determine the screen scaling factor within QB64? hanness 3 844 05-09-2022, 01:37 AM
Last Post: hanness

Forum Jump:


Users browsing this thread: 1 Guest(s)