Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows CMD command for accessing usb?

Tags:

cmd

I have tried googling it but couldn't find it. I know the command for it is cd /media for linux but have no idea what it is for Windows.I also tried the dir command but couldn't find anything related to media or usb.

like image 692
J_SNSD Avatar asked Feb 20 '15 05:02

J_SNSD


People also ask

How do I find USB on Windows 10 cmd?

Open a Command Prompt window as an administrator. Type diskpart . In the new command line window that opens, to determine the USB flash drive number or drive letter, at the command prompt, type list disk , and then click ENTER. The list disk command displays all the disks on the computer.

How can I see connected devices using cmd?

For Windows Users: Type CMD in the search box and click Run as Administrator from the menu. Enter the net view command to view devices connected to your network You will then see a list of devices connected to your network in the output.


1 Answers

You can access the USB drive by its drive letter. To know the drive letter you can run this command:

C:\>wmic logicaldisk where drivetype=2 get deviceid, volumename, description

From here you will get the drive letter (Device ID) of your USB drive.

For example if its F: then run the following command in command prompt to see its contents:

C:\> F:

F:\> dir
like image 196
Utsav Dawn Avatar answered Sep 28 '22 21:09

Utsav Dawn