Playback starts YouTube’s embedded player (privacy-enhanced mode).
How to use DiskPart to clean and format a drive and script or batch file
ChannelIT4U2Description from the creator
How to use DiskPart to clean and format a drive and with Script or Batch file.
Important: Using DiskPart will completely erase everything on the drive you select, making it impossible to undo any changes. It's crucial that you correctly choose the drive you want to clean and format. We always recommend making a full backup of your system before proceeding.
1. Search for CMD and left click Command Prompt shortcut to open the and select Administrator
2. Connect the drive you want clean and format to your computer.
3. Type the following command and press Enter:
diskpart
4. Type the following command to list all the available drives and press Enter:
list disk
5. Take your time and very carefully, on the output from the previous command, identify the drive you want to clean.
For example, in the screenshot below, we can see that we have four different drives listed, including Disk 0, which is 167GB, and we can quickly determine that it's the primary system drive. And because we're trying to clean an 967MB drive, we can easily spot that Disk 1 is the drive we need to select.
Use the following command to select the drive and press Enter:
select disk 1
Remember to change 1 in the command with the number of the drive you want to clean. If you fail to choose the correct number will erase all the data from the wrong drive.
6. Type the following command to clean the drive and press Enter:
clean
7. Type the following command to double-check the drive still selected and press Enter:
list disk
If the drive still selected, you will notice an asterisk (*) next to the disk.
8. Type the following command to create a partition and press Enter:
create partition primary
9. Type the following command to select the partition you just created and press Enter:
select partition 1
10. Type the following command to set the partition active and press Enter:
active
11. Type the following command to format the partition using NTFS and to set a label, and press Enter:
format FS=NTFS quick label=TEST
Remember to change the TEST in the command with the drive name you want to use.
12. Type the following command to assign a drive letter and press Enter:
assign letter=H
Remember to change H in the command with a letter you want that isn't in use by another drive on This PC.
13. Use the exit command to close DiskPart to complete the task.
thank you for watching and see you next time.
Important: Using DiskPart will completely erase everything on the drive you select, making it impossible to undo any changes. It's crucial that you correctly choose the drive you want to clean and format. We always recommend making a full backup of your system before proceeding.
1. Search for CMD and left click Command Prompt shortcut to open the and select Administrator
2. Connect the drive you want clean and format to your computer.
3. Type the following command and press Enter:
diskpart
4. Type the following command to list all the available drives and press Enter:
list disk
5. Take your time and very carefully, on the output from the previous command, identify the drive you want to clean.
For example, in the screenshot below, we can see that we have four different drives listed, including Disk 0, which is 167GB, and we can quickly determine that it's the primary system drive. And because we're trying to clean an 967MB drive, we can easily spot that Disk 1 is the drive we need to select.
Use the following command to select the drive and press Enter:
select disk 1
Remember to change 1 in the command with the number of the drive you want to clean. If you fail to choose the correct number will erase all the data from the wrong drive.
6. Type the following command to clean the drive and press Enter:
clean
7. Type the following command to double-check the drive still selected and press Enter:
list disk
If the drive still selected, you will notice an asterisk (*) next to the disk.
8. Type the following command to create a partition and press Enter:
create partition primary
9. Type the following command to select the partition you just created and press Enter:
select partition 1
10. Type the following command to set the partition active and press Enter:
active
11. Type the following command to format the partition using NTFS and to set a label, and press Enter:
format FS=NTFS quick label=TEST
Remember to change the TEST in the command with the drive name you want to use.
12. Type the following command to assign a drive letter and press Enter:
assign letter=H
Remember to change H in the command with a letter you want that isn't in use by another drive on This PC.
13. Use the exit command to close DiskPart to complete the task.
thank you for watching and see you next time.
About this tutorial
IT4U2 published this 10:16 video tutorial on November 10, 2019. It has been watched 3,120 times on YouTube.
- Channel
- IT4U2
- Category
- Howto & Style
- Duration
- 10:16
- Published
- November 10, 2019
- Views
- 3,120
- Likes
- 14
Tags
Share
This tutorial in other languages
- FRComment utiliser DiskPart pour nettoyer et formater un disque et un script ou un fichier batch
- ESCómo utilizar DiskPart para limpiar y dar formato a una unidad y script o archivo por lotes
- PTComo usar o DiskPart para limpar e formatar uma unidade e script ou arquivo de lote
- ITCome utilizzare DiskPart per pulito e formattare un disco e uno script o un file batch
- DEWie Diskpart zu sauber verwenden, und ein Laufwerk und Skript oder ein Batch-Datei-Format
- NLHoe te DiskPart gebruiken om schoon en formatteren van een schijf en het script of batchbestand
- RUКак использовать DiskPart для очистки и форматирования диска и сценария или пакетного файла
- PLJak korzystać DiskPart do czysta i sformatować dysk i skrypt lub plik wsadowy
- JAドライブおよびスクリプトまたはバッチファイルをきれいにフォーマットするのDiskPartを使用する方法
- ARكيفية استخدام DiskPart ولتنظيف وتهيئة محرك الأقراص والنصي أو ملف دفعي
- HIसाफ करने के लिए DiskPart का उपयोग करें और एक ड्राइव और स्क्रिप्ट या बैच फ़ाइल प्रारूप बनाने के तरीके
- IDCara menggunakan DiskPart untuk bersih dan memformat drive dan script atau file batch