In this guide, you will learn one more use of the Command Prompt.
We will use the command
diskpart in the Command Prompt to hide/show one or multiple drives in the Explorer. This can be useful if you want to hide secret data in a special partition that you can create using the Disk Management utility in Windows.
The good thing about this method is you will never need a third-party tool to do this for you, just remember these commands, you never know when you will need them.
Here we will hide the drive
H:, it’s a flash drive, but you can use this method on any drive or partition in your system.
Hide Drives Using Diskpart
Open the Command Prompt as administrator from the power user menu (press Windows+X keys, then hit A key).
Type in the command
diskpart and hit Enter key.
list volume to display a list of all the drives available, press Enter key.
select volume H or you can also use
select volume 6 since 6 is the number of drive H, press Enter key.
To hide the drive, type the command
remove letter H and press Enter key.
You are done! Close the Command Prompt.
How to Show the Hidden Drive
In diskpart utility, type in the following commands to list all drives, select the drive and assign the letter:
list volume select volume 6 assign letter H
There you have it!
Now you can hide drives in the fly, without using any third-party software, using only the command prompt and diskpart utility.