diskpart

Hello
I am trying to run a .bat that will open the diskpart utility and list the disks on the system.
My .bat contains the following


start diskpart /s f:\list.txt

list.txt contains the following

list disk



my problem is that the diskpart utility opens reads the command from the .txt file runs the command but then the diskpart wimdow quickly flashes the disks on the system and immediatly closes.  I would like it to stay opn.  Whan am I missing here?
TonyElamAsked:
Who is Participating?
 
subhashchyConnect With a Mentor Commented:
use below
 
start cmd /k diskpart /s f:\list.txt

Open in new window


0
 
dave_itConnect With a Mentor Commented:
You need to run the batch file in a command prompt window.
0
 
TonyElamAuthor Commented:
thank you both very very much Subhashchy your solution was the perfect most complete fit.
Thank you also dave it you put me on the right path
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.