Questions tagged [drive]

Use this tag for questions related to physical disk drives. If your question is about the Google Drive API, use [google-drive-sdk]. For Google Apps Script's Drive Service (Class DriveApp) use [google-apps-script].

Drive(disk drive) - the controller and mechanism for reading and writing data on computer disks(a spinning magnetic disk, magnetic disk pack, floppy disk, or optical disk).

Early operating systems used a command line interface in which the user typed short commands, often followed by various parameters and options. For operations on disks, one commonly specified the disk name or drive number (or letter).

References:

958 questions
19
votes
4 answers

How to register newly mounted drive in git bash?

In my day-to-day work (I'm using MS Windows), I keep my git bash (actually using console2 for this) open for the whole day. It is also very frequent that I mount new drives that I would like to work with git. However I noticed that I need to exit…
Łukasz Podolak
  • 958
  • 3
  • 12
  • 24
19
votes
4 answers

List of file in a folder/ DRIVE API PyDRIVE

I can't change folder and view what's inside. drive = GoogleDrive(gauth) file_list = drive.ListFile({'q': "'root' in parents and trashed=false"}).GetList() for file1 in file_list: print("File %s\n\n",(file1)) I used the following code: file_list =…
simone989
  • 397
  • 1
  • 3
  • 8
19
votes
8 answers

How to access specific raw data on disk from java

I'm trying to use the following code to access one byte with offset of 50 bytes in a raw disk. randomAccessFile = new RandomAccessFile("C:", "r"); randomAccessFile.seek(50); byte[] buffer = new byte[1]; randomAccessFile.read(buffer); But all what I…
user178973
  • 228
  • 1
  • 3
  • 8
18
votes
1 answer

Copying files over the network is MUCH slower with `file.copy` than `system(mv ...)`

I have been having some issues with R becoming very sluggish when accessing files over our corporate network. So I dropped back and did some testing and I was shocked to discover that the R file.copy() command is much slower than the equivalent file…
JD Long
  • 59,675
  • 58
  • 202
  • 294
17
votes
5 answers

BAT file to map to network drive without running as admin

I'm trying to create a .bat file that will map to a network drive when it is clicked (it would be even better if it could connect automatically on login if connected to the network, otherwise do not connect) What I have so far is: net use P:…
Bhetzie
  • 2,852
  • 10
  • 32
  • 43
15
votes
3 answers

Combine `Get-Disk` info and `LogicalDisk` info in PowerShell?

I have this query which scans all logical disks information : Write-Host "Drive information for $env:ComputerName" Get-WmiObject -Class Win32_LogicalDisk | Where-Object {$_.DriveType -ne 5} | Sort-Object -Property Name | Select-Object…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
14
votes
8 answers

Get drive label in C#

When I use System.IO.DriveInfo.GetDrives() and look at the .VolumeLabel property of one of the drives, I see "PATRIOT XT", which is indeed the drive's volume label. If I open "My Computer", instead I see "TrueCrypt Traveler Disk", and I can't seem…
Rick
  • 301
  • 1
  • 3
  • 9
14
votes
2 answers

How do I get the drive letter a batch script is running from?

I have a batch script on a CD. Whenever I try to run it and enter %~d0, it returns the C: drive instead of F:, which is my CD drive. What is a way to find the drive letter?
user2245624
  • 149
  • 1
  • 1
  • 4
13
votes
2 answers

How to get Drive Letter and Name (volume label)

I have a program that tells me all the hard disks/ usb's, but it only tells me the drive letter not the name. Here is what I have: DriveInfo[] drives = DriveInfo.GetDrives(); Console.WriteLine("Detected Drives: "); for(int i = 0; i <…
Jister13
  • 183
  • 2
  • 2
  • 6
11
votes
4 answers

Java: how to determine the type of drive a file is located on?

Is there a platform-independent way with Java to detect the type of drive a file is located on? Basically I'm interested to distinguish between: hard disks, removable drives (like USB sticks) and network shares. JNI/JNA solutions won't be helpful.…
mstrap
  • 16,808
  • 10
  • 56
  • 86
10
votes
3 answers

What kind of drive is "NoRootDirectory " (System.IO.DriveType.NoRootDirectory)?

In C# System.IO.DriveInfo has the property DriveType. System.IO.DriveType is an enum: public enum DriveType { Unknown = 0, // // Summary: // The drive does not have a root directory. NoRootDirectory = 1, Removable = 2, …
marsh-wiggle
  • 2,508
  • 3
  • 35
  • 52
10
votes
1 answer

Sharing Google sheet with service account email

I wrote a script to connect to a Google spreadsheet and load data into a postgresql database from it. I already created a service account and obtained the necessary credentials for it in a .json format,the problem is when I try to share the google…
johan855
  • 1,578
  • 4
  • 26
  • 51
10
votes
4 answers

How to get drive information by volume id

I have a txt file with volume id's in it. I need to get drive info (drive letter, drive size, etc.) from the drive volume id (Windows): the volume id is in the following format: \\?\Volume{XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} The drive can be…
user844541
  • 2,868
  • 5
  • 32
  • 60
9
votes
1 answer

Detect drive mount event in c#

How to catch an event when a new drive is added to My Computer and preferably and when new mount point for some drive is created on a NTFS drive? I figued out this but it doesn't work on mounted folders: _eventWatcher = new…
user629926
  • 1,910
  • 2
  • 18
  • 43
9
votes
4 answers

Access public Google drive folder (not from my drive) in Colab?

I have a public link for a GoogleDrive folder: https://drive.google.com/drive/folders/19RUYQNOzMJEA-IJ3EKKUf0qGyyOepzGk?usp=sharing And I want to access the content in a colab notebook. I want anyone who opens the notebook to be able to access the…
Leo
  • 1,176
  • 1
  • 13
  • 33
1
2
3
63 64