Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Diskpart cmd almost 75% complete

Featured Replies

Hi guys,

finally got the diskpart to work with cmd with full automated funcnality still in progress, almost 75% codeing has been done,check out the final.txt and comment on it for further editing.

@ECHO OFF

COLOR 9A

:begin

CLS

ECHO.

ECHO Welcome to Diskpart Which will create partition automaticaly

ECHO Warning it will wipe your data completely

ECHO If selected wrong disk be carefull while selecting

ECHO off

echo>list.txt

echo>list.txt list disk

@echo off

diskpart -s list.txt

@echo off

SET /P disk= Choose a disk:

if ‘%disk%’ == ‘5’ goto 5

if ‘%disk%’ == ‘4’ goto 4

if ‘%disk%’ == ‘3’ goto 3

if ‘%disk%’ == ‘2’ goto 2

if ‘%disk%’ == ‘1’ goto 1

if ‘%disk%’ == ‘0’ goto 0

goto error

:error

echo.

echo The disk letter you entered was not recognized

echo.

pause

goto begin

:0

echo:

echo>select.txt

echo>select.txt select disk 0

@echo off

diskpart -s select.txt

echo.

echo Would you like to Create a new partition.

echo.

echo Type C for Create partition or wanna edit volume

echo Type E to see the volume

SET /P ok= Choose a option:

if ‘%ok%’ == ‘c’ goto yes

if ‘%ok%’ == ‘C’ goto yes

if ‘%ok%’ == ‘e’ goto no

if ‘%ok%’ == ‘E’ goto no

goto error

:error

echo.

echo The letter you entered was not recognized

echo.

pause

goto begin

:no

echo.

echo Select volume

echo be carefull will selecting

echo.

echo>volume.txt

echo>volume.txt list volume

@echo off

diskpart -s volume.txt

echo off

set INPUT=

set /P INPUT=Type input: %=%

echo Your input was: %INPUT%

pause

echo select volume=%INPUT% >>selectvolume.txt

diskpart -s selectvolume.txt

:yes

echo:

echo>active.txt

echo>active.txt active

@echo off

diskpart -s active.txt

echo.

echo Put size u want for partition.example size in 1024 mb

echo The size will be in MB not GB

echo.

echo off

set INPUT=

set /P INPUT=Type input: %=%

echo Your input was: %INPUT%

pause

echo CREATE PARTITION Primary Size=%INPUT% >>create part.txt

goto error

:error

echo.

echo The disk letter you entered was not recognized

echo.

pause

goto begin

:end

echo Thank you for using this tool

Del /f "list.txt"

Del /f "volume.txt"

Del /f "select.txt"

pause

exit

final.txt

Edited by sayyed.ali1981

  • 6 months later...

wow man, looks awesome.

I was writing similas thing myself.

...though i got to the part where user selects diks and gets message that disk X is selceted.

I cant incorporate "clean" command afterwards.

I ant user to get Questio anfter choosing disk if disk needs to be cleaned but I dont kn ow...can t make it work.

Any Ideas???

I haven't even checked the posted code, but there is a trick to embed diskpart commands inside a batch, check this thread here:

jaclaz

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.