Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have made batch file that can run diskpart but I want to do the following commands:

diskpart> list volume
diskpart> select volume 2
diskpart> remove letter d
share|improve this question

migrated from Sep 29 '13 at 9:23

This question came from our site for professional and enthusiast programmers.

Drum Role - The question is? – Ed Heal Sep 29 '13 at 9:04

Put your three commands in a text file:

list volume
select volume 2
remove letter d

Then pass the text file to diskpart:

diskpart.exe /s C:\mycommands.txt
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.