Flopgen is a tool for automatic creation of FAT-formatted floppy disk images with user-supplied files.
This program should be especially useful for people who need to transfer files frequently between their main machines and emulated/virtualised legacy systems with no or unreliable CD support (e.g. DOS and old versions of Windows).
- Creating FAT12-formatted .img floppy disk images in a raw format with capacity either 360, 720, 1200, 1440 or 2880 KB
- Making as many images as required automatically if supplied files do not fit in one disk
- Organising provided files so that the largest ones are put in a floppy disk image first
- Reading the list of files to be added to images from either the command line, the standard input or a text file
- Processing both files and directories supplied by the user (directories are always processed recursively)
You can download pre-built binaries from the releases page.
- Make sure that a compiler supporting the C++17 standard is installed on your machine.
- Clone the repository:
git clone https://github.com/maksgraczyk/Flopgen
. - Navigate to the directory where you have cloned the repository and run
make
. - Done! You can run Flopgen by executing e.g.
./flopgen
on Linux/Unix.
For the first use, running flopgen --help
is recommended. This will display a help message explaining how to use the program along with all available flags and options.
Apart from running help, you must always specify the -o
/--output
option when using Flopgen. This option tells the program how to name resultant floppy disk images (there might be more than one image produced). For example, executing Flopgen with -o test
will produce images of form test1.img
, test2.img
, test3.img
etc.
By default, Flopgen creates FAT12-formatted 1440 KB floppy disk images using code page 437. Long file name support is always enabled.
If a directory or a file takes too much disk space (i.e. takes more disk space than the specified floppy disk capacity), Flopgen will not add it to any image. A directory is counted as one inseparable element. Please note that the disk space occupied by a file is not necessarily the same as the size of the file due to how FAT is structured.
When Flopgen runs successfully, you will see Successfully created X floppy disk images.
, where X is the number of resultant images. These are produced in the same directory Flopgen is run in (because of that, do not run the program with -o
set to some path like test/disk
, this will not work).
flopgen -o (name) test1.dat test2.dat test3.dat
flopgen -o (name) -s 720 Floppy
Filenames must be separated by a new line in the list.
flopgen -o (name) -i -
Filenames must be separated by a new line in the list.
flopgen -o (name) -s 2880 -i list.txt
flopgen -o (name) -c 852 Disk
The command is Linux/Unix-specific. In this case, the resultant images will contain all files stored inside directory Folder, but without the directory entry Folder itself.
flopgen -o (name) Folder/*
If so, don't hesitate to report it in the issues page.
Great! All contributions are welcome.
- FatFs: Flopgen uses FatFs created by ChaN and partially modified by myself. Its code is stored in the
fatfs
directory and is licensed under the terms outlined infatfs/LICENSE.txt
. The exception isfatfs/fattime.c
which is a file written by myself and released under the 2-clause BSD license. - CLI11: Flopgen uses CLI11 for command line input parsing. Its code is stored in the
cli
directory and is licensed under the terms outlined incli/LICENSE
.
Apart from the third-party code indicated in the previous section and fatfs/fattime.c
, the project is released under the GNU General Public License v3.0 (see LICENSE
). If in doubt, check the starting comment of a source file for licensing information applicable to the file.