Posted on 2011-03-17
Medium Priority
Last Modified: 2012-05-11
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?
Question by:TonyElam

Assisted Solution

dave_it earned 100 total points
ID: 35159577
You need to run the batch file in a command prompt window.

Accepted Solution

subhashchy earned 1900 total points
ID: 35159607
use below
start cmd /k diskpart /s f:\list.txt

Open in new window


Author Closing Comment

ID: 35159676
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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.

Join & Write a Comment

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension . This reminded me of questions that come up here at EE along the lines of, "How can I tell the type of file from its cont…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question