Questions tagged [drive-letter]
55 questions
3
votes
3 answers
Extract Drive Letter, java regex
I cannot get this simple regex to work. I need to check to see if the file path includes the drive letter, if it doesn't throw an exception.
if (!arcvalFileFormBean.getTxtFileReview().matches("^([A-Z]):")) {
status = "MAPPING ERROR: Please…

staples89
- 167
- 3
- 14
2
votes
1 answer
Drive Letter vs. DevicePath
I'm searching about this since last week, almost all links about DriveLetter x DevicePath/Volume/Device ID/whatever are purple for me.
I'm developing an application that List some sotorage devices and also HDI/WPD devices using SetupApi functions…

lcssanches
- 995
- 12
- 33
2
votes
2 answers
How to get the drive letter from a full name of the drive
How could the drive letter (e.g. F:\) be obtained from a known full name (if it is present) of a drive (e.g. WORKMEMORYSTICK) using C# under Windows?
Even the other way around would be a start.

James
- 30,496
- 19
- 86
- 113
2
votes
4 answers
How do I get the substed drive letter in Perl?
I need to get substed drive letter in Perl. Could anyone kindly help me?
$ENV{SYSTEMDRIVE} does not work; it gives me real logical drive letter, not the substed one.

Dungeo
- 177
- 2
- 7
- 16
2
votes
2 answers
Batch Why Do Drive-Letters Become Uncapitalized
In batch, when I change to a different drive capitalized, it automatically corrects the capitalization of everything except fr the drive letter except fr when the new drive I am cding to is the same drive i'm currently in. Like so (this is just an…

The Pepper
- 29
- 2
2
votes
1 answer
Get iscsi mapped drive letter from iscsi initiator name
In PowerShell I'm trying to get the drive letter that an ISCSI target is mapped to. I'm using the following to get the ISCSI initiator name.
Get-IscsiTarget | ? {$_.IsConnected -eq $True} | Select -ExpandProperty NodeAddress
I have tried using…

Richard
- 6,812
- 5
- 45
- 60
2
votes
1 answer
Extracting the drive letter from a Windows path string
Is there any built-in cross-platform way in Java for parsing a Windows path string and extracting the root path (including the drive letter) for Windows?
According to Java SE documentation, one can use the java.nio.file.Path class, e.g.
String path…

PNS
- 19,295
- 32
- 96
- 143
2
votes
1 answer
Detecting Removable drive letter in CMD
I'm trying to write a script, which will detect the letter of my USB Removable Drive called "UUI" and then create folder on it. I've written few commands for CMD which, when run separately, work. However when I put them into a bat file, I always get…

user2933357
- 25
- 1
- 5
2
votes
1 answer
Retrieve mount point of WPD device
I've worked with WPD API for a while now, and I seem to run in to problem after problem.
Once I fix one problem, something else pops up. But hey, that's life.
I've been trying to determine if a WPD device is a storage device or a phone or…

Aid Vllasaliu
- 85
- 2
- 11
2
votes
1 answer
Get partition name from drive letter and vice versa
The program I'm working on needs to access removable drives. Normally this wouldn't be a problem, because the mountpoint should stay the same (e.g.: On Ubuntu my phone's SD card gets mounted at /media/sebastian/GT-S5830/) But on Windows there are…

s3lph
- 4,575
- 4
- 21
- 38
2
votes
1 answer
Add colon to file path after drive letter (ie: change /c/ or c/ to c:/) in Java
Basically, I'm getting a file path from a string inside of a CSV file. However, for some reason, the program generating the CSV file removes the colon from the string, so I end up with a file path that does not work inside of Java. The typical…

DGolberg
- 2,109
- 4
- 23
- 31
2
votes
1 answer
Getting Portable Devices using java
I am trying to access some files in a device (having "windows CE" application in it) that appears as portable device in windows 7 using java applet....
My device path is like "Computer\Attari's Device\myfile.txt" Now i am trying to access file…

Umair Aziz
- 1,518
- 1
- 19
- 29
2
votes
5 answers
Batch file and variable USB drive letters
I'm trying to create a backup batch file to automate Acronis True Image and backup maintenance.
The USB drive letter changes depending on which machine I'm backing up and /or how many devices are connected and using drive letters...
My batch resides…

S3NTYN3L
- 35
- 1
- 2
- 5
1
vote
1 answer
How to assign available driveletter by mapping type name using powershell?
I would like to assign a driveletter to a specific volume.
But I don't know which driveletter is availabel, so I use looping to check available letter. I tried this way but it always return to input partition number.
$DriveLetterList = 90..65 |…

Cheries
- 834
- 1
- 13
- 32
1
vote
1 answer
Aquiring USB Drive Letters from command and use them as choice variables
I'm trying to create a batch file for backing up folders to a usb drive. In a certain point I want the batch to show a list of all avalaible USB Drives connected to the computer and then asking the user to select the drive letter of one of them to…

Chris Evan
- 25
- 4