Coder Social home page Coder Social logo

diskpart's Introduction

Format a Hard Drive Using the Command Prompt

Formatowanie dysku twardego przy wykorzystaniu wiersza poleceń

STEP 1: Open Command Prompt As Administrator

search for > cmd

run as Administrator

run as administrator

or use file explorer and find cmd file, use right mouse button and select Run as administrator

run as administrator

STEP 2: Use Diskpart

Once command line is open, type **diskpart** and press Enter.

Po włączeniu wiersza poleceń, wrowadź komendę **diskpart** i zatwierdź klawiszem Enter

c:\windows\system32 > diskpart

cmd

STEP 3: Type List Disk

The above command will open a Diskpart window. In this window, type list disk and press Enter.
It will list all the available drives.

DISKPART> list disk

cmd

STEP 4: Select the Drive to Format

select disk #
`# stands for number of disk

DISKPART> select disk 2

cmd

Now type 'select disk (disk number)' as shown above.
Specify the drive number which needs to be formatted.

STEP 5: Clean the Disk

In this step, type clean. This command will permanent delete all files and folders, and successfully clean up the disk.

DISKPART> clean

cmd

STEP 6: Create Partition Primary

DISKPART> create partition primary

To make the drive again accessible, type create partition primary

You can set size of partition with commend:

create partition primary size=100000

cmd

DISKPART> list partition

STEP 7: Format the Drive

DISKPART> format fs=ntfs quick

cmd

Now format the drive with FAT or NTFS file system. Type format fs=ntfs and press Enter.

If you need to format a hard drive partition to FAT32 or other file systems, replace NTFS with FAT32, exFAT, etc.

**Difference between a "format fs=ntfs" and a "format fs=ntfs quick" **

"When you choose to run a regular format on a volume, files are removed from the volume that you are formatting and the hard disk is scanned for bad sectors. The scan for bad sectors is responsible for the majority of the time that it takes to format a volume.

If you choose the Quick format option, format removes files from the partition, but does not scan the disk for bad sectors. Only use this option if your hard disk has been previously formatted and you are sure that your hard disk is not damaged."

WARNING

If you accidentally input format without fs=ntfs quick or fs=fat32 quick in DiskPart command prompt, it will execute a full format on your selected hard drive partition. This command will erase all saved data sector by sector. In other words, you'll permanently lose all erased data on the disk with no recovery chance.

STEP 8: Assign a Drive Letter

DISKPART> assign

To assign a drive letter, you can type 'assign' as shown below.

cmd

You can assign specyfic letter for each volume:

DISKPART>
list volume
select volume 2
assign letter=z 

STEP 9: List existing volumes

Along with your list of disks, you can also ask Diskpart for a list of detected volumes.
At the “DISKPART>” prompt, type list volume:

DISKPART> list volume

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.