drive

How to get drive information by volume id

我的未来我决定 提交于 2019-12-05 05:07:45
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 Removable/local disk It doesn't matter how the info is retrieved (it could be script, cpp ,c#, java code). EDIT: I tried to use DriveInfo, Win32_LogicalDisk, Win32_Volume, Win32_PnpDevices - but I couldn't find this weird id... in all cases the id has a differrent format UPDATE: Found out how to do it. you can enumerate Win32_Volume like this:

Android, Google Drive: Google consent screen freezes

↘锁芯ラ 提交于 2019-12-04 18:41:09
I've upgraded my app to the Google Drive REST API and its Java wrappers, as described here: https://developers.google.com/drive/android/deprecation My code is very close to the official demo app provided by Google. I also cross-checked with other code examples I've found. The Google Drive API upgrade itself was successful, but now there are very few users that cannot log-in anymore. The Google consent screen displays a white box and the circle is rotating. No information is displayed at all. On the code side the app receives the callback that something failed. No further information. No chance

How to get Drive Letter and Name (volume label)

我的梦境 提交于 2019-12-04 12:18:48
问题 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 < drives.Count(); i++) { Console.WriteLine("Drive " + i + ": " + drives[i].Name); } return drives; and this prints: Drive 0: C:\ Drive 1: E:\ but I want the name such as Drive 0: C:\ Local disk Drive 1: E:\ Kingston USB how do I get this? 回答1: You are looking for

PHP upload/read files on separate drive

ε祈祈猫儿з 提交于 2019-12-04 06:24:37
问题 I need to be able to upload/view files on a separate drive. Right now, my site is in the htdocs folder on the C: drive. We have been allocated space on the D: drive to upload and view files. Using the code below, I can use scandir to view what is located in htdocs folder: <?php $dir = '../../htdocs/'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2); ?> But I need to traverse back a few more to be able to get to the D: drive. I am not sure if this is

when getting drive information using java

北战南征 提交于 2019-12-04 01:52:34
问题 i tried the following program import java.io.*; class dr { public static void main(String args[]) { try{ File[] roots = File.listRoots(); for (int index = 0; index < roots.length; index++) { //Print out each drive/partition System.out.println(roots[index].toString()); } } catch(Exception e) { System.out.println("error " +e); } } } but in my system floppy drive is not connected and i am getting a message like the following " The drive is not ready for use;its door may be open,Please check

How to get Drive Letter and Name (volume label)

十年热恋 提交于 2019-12-03 07:42:20
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 < drives.Count(); i++) { Console.WriteLine("Drive " + i + ": " + drives[i].Name); } return drives; and this prints: Drive 0: C:\ Drive 1: E:\ but I want the name such as Drive 0: C:\ Local disk Drive 1: E:\ Kingston USB how do I get this? You are looking for the VolumeLabel property: http://msdn.microsoft.com/en-us/library/system.io.driveinfo.volumelabel.aspx

如何把文档扫描保存到Google Drive中

瘦欲@ 提交于 2019-12-03 06:15:28
我们有时候需要使用扫描仪来把纸质文档转换成电子文档用于保存。这篇文章介绍如何创建一个简单的应用,把文件扫描成图片,保存到Google的云服务中。 参考原文: How to Upload Scanned Images to Google Drive With Dynamic .NET TWAIN 准备工作 下载安装 Dynamic .NET TWAIN SDK 。 如果没有扫描仪,可以下载安装 虚拟扫描仪 。 扫描文件 在Visual Studio中创建一个WinForms的工程。 在引用中添加 DynamicDotNetTWAIN.dll 。 创建界面:左侧的显示区域是DynamicDotNetTWAIN控件。 获取设备: dynamicDotNetTwain.OpenSourceManager(); for (lngNum = 0; lngNum < dynamicDotNetTwain.SourceCount; lngNum++) { cmbSource.Items.Add(dynamicDotNetTwain.SourceNameItems(Convert.ToInt16(lngNum))); } 获取图像,显示在控件中: try { dynamicDotNetTwain.SelectSourceByIndex(Convert.ToInt16(cmbSource

Using the UIDocumentPickerViewController, is it possible to show a default service (Dropbox, Google Drive, etc) on first open like in Slack?

大城市里の小女人 提交于 2019-12-03 04:55:40
问题 Normally, the behavior with UIDocumentPicker is that you present, then the user must use the "Locations" menu on the top right to switch between the services. Is it possible to display either "Dropbox" or "Google Drive" first by default? Almost as if we're "deeplinking" into the UIDocumentPicker service. It seems like Slack App is able to do this and also the MyMail App but I wasn't able to find an API for it. Any ideas? 回答1: Instead of using a UIDocumentPickerViewController, try using a

Using the UIDocumentPickerViewController, is it possible to show a default service (Dropbox, Google Drive, etc) on first open like in Slack?

不问归期 提交于 2019-12-02 18:10:17
Normally, the behavior with UIDocumentPicker is that you present, then the user must use the "Locations" menu on the top right to switch between the services. Is it possible to display either "Dropbox" or "Google Drive" first by default? Almost as if we're "deeplinking" into the UIDocumentPicker service. It seems like Slack App is able to do this and also the MyMail App but I wasn't able to find an API for it. Any ideas? Instead of using a UIDocumentPickerViewController, try using a UIDocumentMenuViewController. Here is the relevant documentation . UIDocumentMenuViewController

How to Create a Virtual Windows Drive

↘锁芯ラ 提交于 2019-12-02 16:44:14
I'm trying to create a Windows Virtual Drive ( like c:\ ) to map a remote storage. The main purpose is to do it in a clear way to the user. Therefore the user wouldn't know that he is writing/reading from another site. I was searching for available products, and i find that FUSE is not an option in Windows and WebDAV maps directly the drive, and i would like to build a middle layer between windows and remote storage to implement some kind of services. Another alternatives exists, such as Dokan, that is very expensive, and System.IO.IsolatedStorage Namespace, that doesn't seem to explicity