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

migrated from stackoverflow.com 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy