Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

User input for a DISKPART batch file.

$
0
0

I'm trying to create a batch file for Diskpart that requires user input, for example I want to use the command "list disk" and require the user to select a disk.

I have used this disk part command:

diskpart /s"scriptname".txt

And created the necessary text file eg:

LIST DISK

SELECT DISK 1
CREATE PART PRIMARY
SELECT PART 1
ACTIVE
ASSIGN
FORMAT FS=NTFS
EXIT

What would be the replacement for "SELECT DISK 1" if I wanted the user to input that data?

Many Thanks.


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>