batch file to spam a removable drive with partitions?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
kidney bean
Posts: 1
Joined: 26 Oct 2020 16:36

batch file to spam a removable drive with partitions?

#1 Post by kidney bean » 26 Oct 2020 16:39

I have tried this:

Code: Select all

@echo off
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
diskpart /s script.txt
and heres the txt:

Code: Select all

SELECT DISK 1
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT QUICK
ASSIGN LETTER=E
EXIT
but it wont work, i just stay with 1 non-functioning partition. please help.

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: batch file to spam a removable drive with partitions?

#2 Post by aGerman » 27 Oct 2020 16:25

I don't understand the reason for something like that. But at a brief look you're trying to assign drive letter E again and again. How many drives with the same letter have you ever seen?

Steffen

Eureka!
Posts: 136
Joined: 25 Jul 2019 18:25

Re: batch file to spam a removable drive with partitions?

#3 Post by Eureka! » 27 Oct 2020 18:37

You forgot to create a VOLUME in your diskpart script :)

Post Reply