how we can create a batch file which will shrink our existing volume an create a new volume on window machine

Hello viewer In this tutorial I'll show you how we can create a batch file which will shrink our existing volume an create a new volume on window machine.

You can follow the video tutorial give below or you can follow the steps mentioned here


I am using a test machine to demonstrate this procedures So in this window machine we a one volume that is C and it's size is around  150GB see the below screenshot



so our goal is to create a new volume of 40GB out of this 150GB drive to achieve like something mentioned below



So here is the script for this process in one single click

@echo off
(echo select disk 0
 echo list vol
 echo select volume=C
 echo shrink desired 40000
 echo list volume
 echo create partition primary
 echo format quick fs=ntfs label="Data"
 echo assign letter=G:
) | diskpart

pause

what all you need is to type this into a notepad and save this file as .bat then run
as administrator.



very important : This script is wrote to keep in mind that there is only one volume on your hard disk that is "C" and you need to create the new volume on the  same disk like in our case we have only one disk that is disk 0

so lets test the scripts in real world. Please run the script as an administrator


That's it this will save lots of your time.Please see the final out put as showing the screenshot below


I hope you like this tutorial please do visit on by blog for more informative tutorial.

Thanks and have a nice day!!!!!!
Share:

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

WELCOME TEXT

Welcome !!! viewers and thank you to visit my blog noteoftech this blog will help you to find the resolution of many tech related issue and also very useful tech related tutorial. So please don't forget to visit my blog on daily basis...and please bookmark this page also. So enjoy this blog and have a nice day!!!!.

About Me

Find Us On Youtube

Hi viewers!!! you can find other useful tech tutorial on our Youtube Channel KonwItFree Please click below to visit our channel

Popular Posts

Powered by Blogger.

Recent Posts

PAGES

Archive

Labels

AWS (7) CCNA (2) CCNP (2) cisco (2) Cyberoam (1) eve-ng (2) Firewall (5) googlecloud (3) Juniper (1) MACOS (1) Mint OS (2) Openldap (5) oraclecloud (6) other (15) pfsense (5) securecrt (1) Sophos (3) Ubuntu (9) Vmware (9) VPN (1) Window (5) Window10 (9) WIndow7 (4) WinServer (2) WinXP (1) xubuntu (2)

Labels