[cmd] Windows CMD command for accessing usb?

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.

This question is related to cmd

The answer is


Try this batch :

@echo off
Title List of connected external devices by Hackoo
Mode con cols=100 lines=20 & Color 9E
wmic LOGICALDISK where driveType=2 get deviceID > wmic.txt
for /f "skip=1" %%b IN ('type wmic.txt') DO (echo %%b & pause & Dir %%b)
Del wmic.txt
pause

firstly you have to change the drive, which is allocated to your usb.

follow these step to access your pendrive using CMD. 1- type drivename follow by the colon just like k: 2- type dir it will show all the files and directory in your usb 3- now you can access any file or directory of your usb.