fbird90 0 Newbie Poster

Hello everyone.
This is Jasdeep Singh.

I use diskpart to remove and assign letters to the volumes on my hard disk.

When i have to remove a volume from my computer, i use

list volume 0 //where 0 is the volume no. for my d drive
remove letter d

and the D drive is removed from my computer and nobody has access to it.

When i have to get it again.. i use diskpart & write:
list volume 0
assign letter d


Now this is easy but time consuming.

So, can anybody tell me if a script can be made which runs diskpart and writes all the commands, one for assigning and one for removing letter of a known partition...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.