NAME pilebuilder.pl - Move many small files into CD-R sized folders. SYNOPSIS pilebuilder.pl [options] --sourcedir source_directory1 [--sourcedir source_directory2 ...] Options: --sourcedir Specify a source directory containing files to move. --destdir Set the destination directory (Default ".") --prefix Set the prefix (Default "disk") --sizelimit Set the sizelimit (Default 640 megabytes) OPTIONS --destdir *destination_directory* Use "destination_directory" instead of the current directory. --prefix *prefix* Use "prefix" is the name of the new directories instead of the default, "disk". Numbers will be appended to this prefix as needed. --sizelimit *n* Set the sizelimit for newly created directories to "n" instead of the default, 640 MB. N is measured in bytes. (1 MB = 1024^2 bytes) DESCRIPTION This program is meant to be used to gather many small files into directories sized suitably for burning to a CD. The program will NOT split files that are too large for a CD. Nor will it do very careful packing - we just run through all the source directories listed and sequentially drop files into new directories, creating as many as needed and sequentially numbering them as we create them. For example, if you have 16,000 jpeg files taking 2000 megabytes worth of disk space and you'd like to burn those to CD, then you probably need them seperated into disk images of about 660 megabytes. (We do 640 by default just to be careful.) This program could be used to easily create a series of new directories, each containing not more than 640 megabytes worth of files. For example: pilebuilder.pl --sourcedir /dir/containing/jpegs This would create directories disk1, disk2, disk3, disk4, and possibly even disk5, each containing not more than 640 MB worth of files. If you wanted to be more precise and use as close as possible to 660 MB per CD, then you could use --sizelimit 692060160. BUGS Because of the way files are actually stored in the filesystem, it's likely that files will take more space on the filesystem than the sum of their lengths. This is just the nature of filesystems. This is why although a "700 MB" CDR can actually hold 660 MB, we only try to fill it with 640 MB by default - you may need to lower the sizelimit even more than the default. Also, not a bug per se, but the script should probably be made smart enough to pack the files a lot better. All we do is sequentially process the files - we never go back and try to stuff the nooks and crannies. Thus we could actually use almost twice as many CDs as necessary - however, this isn't such a problem as long as the standard deviation is small relative to the number of files. In other words, it's pretty effective if there are many, many files that are small relative to the sizelimit. But if you're really worried about the number of disks you use, make one big tar file and split it into chunks instead. Or write your own script. AUTHOR Trever Furnish, trever@wondious.com, chewtoy@netscape.net LICENSE This script is copyright 2001 Trever Furnish. It is released under the GPL, version 2. However, it requires PERL and the Getopts::Long module, both of which may be subject to entirely different licenses depending on the versions installed on your system. YMMV. The text of the license may be found in the file named COPYING, which should've been included wherever you obtained this script. It may also be found at the Gnu web site, http://www.gnu.org .