134Managing partitions using GDisk
Performing multiple GDisk operations using batch mode
Performing multiple GDisk operations using batch mode
Use the batch mode switch, /batch, to perform multiple GDisk operations with a single command. Using the /batch switch lets you avoid loading GDisk from the boot disk each time. Batch commands can either be supplied interactively at a prompt or in a
If the name of a text file is supplied along with the batch mode switch, GDisk opens the file and executes the commands within it until all commands have been executed or one of the commands encounters an error.
Note: To use the Windows version of GDisk in the example commands, replace gdisk with gdisk32.
For example:
C:\> gdisk /batch:cmds.txt
If the batch mode switch is supplied without a file name, GDisk prompts for the commands to execute.
Following is a sample batch command file called
#delete all partitions /del /all
#create formatted FAT16 primary DOS partition and then create an extended
#partition
#create formatted FAT16 logical DOS
The following command deletes all partitions and creates two new ones on the second fixed disk with confirmation prompting turned off:
gdisk