Questions tagged [drive-letter]

55 questions
10
votes
1 answer

Programmatically check whether a drive letter is a shared/network drive

Is there a way to check whether a drive letter stands for a shared drive/network drive or a local disc in python? I guess there is some windows api function that gives me that info, but I can't find it. Perhaps there is even a method already…
Philip Daubmeier
  • 14,584
  • 5
  • 41
  • 77
8
votes
2 answers

Resolve Windows drive letter to a path (subst and network)

I wonder if there is a universal way of resolving a path using a drive letter (such as X:\foo\bar.txt) into its equivalent UNC path, which might be one of the following: X:\foo\bar.txt if X: is a real drive (i.e. hard disk, USB stick,…
Pierre Arnaud
  • 10,212
  • 11
  • 77
  • 108
7
votes
4 answers

Get drive letter from filename in Windows

Is there a Windows API function to extract the drive letter from a Windows path such as U:\path\to\file.txt \\?\U:\path\to\file.txt while correctly sorting out relative\path\to\file.txt:alternate-stream etc?
Felix Dombek
  • 13,664
  • 17
  • 79
  • 131
7
votes
5 answers

Programmatically set EBS Volumes Windows Drive Letters using Terraform, Chef or Powershell

I'm using terraform and chef to create multiple aws ebs volumes and attach them to an EC2 instance. The problem is I want to be able to give each ebs volume a specific windows drive letter. The problem is when the EC2 instance is instantiated…
Brad
  • 1,979
  • 7
  • 35
  • 47
7
votes
3 answers

Portable Device Path on Windows

I've actually got an Windows/Java Question. I've got a plugged-in device which I want to access via Java. Normally you can access an e.g. USB-Stick via the Drive letter... but this tablet is displayed by Windows as a "Portable Device"... which…
Ripei
  • 432
  • 2
  • 8
  • 19
5
votes
2 answers

Get valid drive letter and is occupied

I want scan all available drive letter that exist on my computer, and get detail with it (chk if occupied, chk for type and size). I have no problem about how to get size by using the codes bellow var FreeAvail, totalSpace: Int64; begin if…
Bianca
  • 973
  • 2
  • 14
  • 33
4
votes
2 answers

Getting CD drive letter in VB.NET

I am using the following code to get a list of the letters for each drive on my computer. I want to get the drive letter of the CD drive from this list. How do I check it? The code I am using to get list is as below: In the Form.Load event: …
Furqan Sehgal
  • 4,917
  • 33
  • 108
  • 167
4
votes
1 answer

Convert from Windows NT device path to drive letter path

How can I resolve a path with drive letter from a device path? For example, convert \Device\HarddiskVolume4\Windows\System32\RuntimeBroker.exe into C:\Windows\System32\RuntimeBroker.exe Assuming HarddiskVolume4 maps to C: on this computer. I have…
Bruno Zell
  • 7,761
  • 5
  • 38
  • 46
4
votes
2 answers

What is the maximum length of a Windows XP drive label?

Question is pretty much self-explanatory. I'm working with naming USB drives if that matters. Thanks.
evanmcd
  • 1,967
  • 3
  • 32
  • 52
4
votes
1 answer

Check if USBdevice is connected

For a WPF-application i'm programming using c#, i want to check if a specific USB device (in this case it's a Philips GoGear Vibe) is connected to the PC. Basically I want a function that checks this and returns a bool. I would also lik to be able…
svdotbe
  • 168
  • 1
  • 3
  • 16
4
votes
2 answers

Programmatically assign new letter to existing drive with C++

I want to change a drive letter. For example, I can use diskpart to assign a new letter to a drive (a USB disk or a new hard disk). How can I implement it in C/C++?
mark
  • 292
  • 1
  • 6
  • 18
4
votes
1 answer

Identify if a drive letter is a local or network drive?

I'm working on a utility which has an input for a shared folder. My app requires that the folder selected is on a remote computer, and not on the local computer. I would like to recognize if the user selects C:\ from the local computer as opposed to…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
3
votes
2 answers

Converting a drive letter to a Partition ID / Disk ID

Given a drive letter, how do I get the OSImage InstallTo Partition ID and Disk ID without using the registry?
unixman83
  • 9,421
  • 10
  • 68
  • 102
3
votes
2 answers

Spring Framework fails on paths with Windows Drive Letters

I am using Spring Framework version 4.3.18.RELEASE under Intellij on Windows 7. I am looking at the decompiled code of, for example, the class org.springframework.core.io.DefaultResourceLoader and the method public Resource getResource(String…
3
votes
1 answer

Powershell Script to compare VolumeID to DriveLetter

I have a powershell script running wbadmin with source C: to a target iSCSI volume which is specified by its volume ID (\?\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}). The backup itself runs perfectly fine, I just wanted to add an offsite-backup…
HannesS
  • 173
  • 6
1
2 3 4