// PartitionMagic Script File

// This script file is an example of the If-Then script statement.

// Scenario:
// Disk 1 contains an unknown amount of unallocated space at the end of the 
// disk.
//
// If more than 300 MB of unallocated space is available, the user would like 
// to create a Linux Ext2 partition and a Linux Swap partition on the disk.

// Select the last unallocated space and check for at least 300 MB available
Select Disk 1
Select Unallocated Last
If GetSelectedUnallocatedSize > 300 Then
     // Space is large enough, so create the new partitions
     Create /FS=LinuxSwap /Size=100 /Position=End
     Select Unallocated Last
     Create /FS=LinuxExt2
End If
