A command line version of Win32DiskImager
Originally modified for use in PiBakery, CommandLineDiskImager is a command line version of the popular Win32DiskImager program used to write images to removable storage devices, such as SD cards and USB drives.
Currently only writing an image file to a device is supported, you can't read a device to a file just yet. MD5 checks have also not been implemented yet.
To use:
- Download CommandLineDiskImager.exe from the release page
- Open an elevated (administrator) Command Prompt.
- cd into the directory that contains CommandLineDiskImager.exe
- Run
CommandLineDiskImager.exe pathToImageFile driveLetterwherepathToImageFileis the path to the image file you want to write, anddriveLetteris the single letter of the drive that you want the image written to
Example:
CommandLineDiskImager.exe C:\Users\John\Downloads\raspbian.img G
would write the image file located C:\Users\John\Downloads\raspbian.img G to the drive G:
The file will exit with the following error codes:
- not enough arguments
- .img not found
- device not found
- invalid handle value for volume
- can't get lock on volume
- can't unmount volume
- invalid handle value for file
- invalid handle value for disk
- not enough space on volume
- sector data is null
- error whilst writing