PCopy

This text is from my arcives. It may be out of date, but I thought it should be preserved.

pcopy is not an great project, it's only one of some little tools, I've written.
It's an multi function splitter.
68000 Archive (5316 Bytes) | 68020 Archive (4308 Bytes)

Usage To get an extended help, first type pcopy and an questionmark, then at the prompt a second questeionmark. All options/parameters will be displayed bold. The parameters SRC and DST are compulsory for all functions, and specifies the source and destination file. The option SIZE can be used in bytes, kilo-bytes or mega-bytes. Kilo- and mega-bytes must be indicated by a "k" or "m" behind the number. A SIZE less or equal zero is not allowed. This program has four funtions:
ONE: pcopy <SRC> <DST> SIZE=<SIZE>
You can use pcopy to split the SRC file into many pieces, which have the size SIZE.
If the name for the DST file contains a number, it will be counted up, each part. If there is no number in it, an "1" will be added at the first, and then counted up. And if the extension of the destination file is ".lha" he will count like lha's multiple volume option (.lha, .l01, .l02, ...). TWO: pcopy <SRC> <DST> MULTI [SIZE=<SIZE>] [NOINC]
Split the file on multiple volumes. If no SIZE is specified, the disk will be filled up, until there is full. And then you will be asked for the next volume, and so on.
If the NOINC option is active, the filename will be for each part exactly the name for the DST file, otherwise he will count like ONE. FOUR: pcopy <SRC> <DST> REST=<REST> [SIZE=<SIZE>]
This function will copy the first SIZE bytes to the DST file, and the rest of the file to REST. If SIZE is not specified, he will write to DST until the disk is full. THREE: pcopy <SRC> <DST> TRUNC [SIZE=<SIZE>]
This function is like FOUR, but the SRC file will be replaced by the REST file.


Information Last but not least there is the option BUF. This option can be used with all four functions. With this option you can specify how much kilo-bytes should be used as buffers. The default is 100k. The BUF option must be in the range from 5k to 5/6th of the largest free mem, if not it will be adapted. A number less or equal zero will be interpreted like the maximum. To the read process will be done by the AsyncIO library (linked). He will use 2/5th of the buffer. The write process to fill up the disk uses synchron commands and no extra buffer. The write process with a specified size will be also done by the AsyncIO library, which uses another 2/5th of the buffer. The last 1/5th of the buffer is used by me to read and write. By writing to fill up a disk, only blocks with the size of the blocksize of the medium will be used. In case of OFS/FFS that will be 488/512 bytes. An enlarge of the buffer will have no effect for writing. But one block (most 488/512 bytes) must be fit in 1/5th of the buffer. If you have a blocksize of more than 20k, you have to set the buffer by hand. If you are writing with a specified size or the rest of an file, the enlargeing of the buffer may have a speed increase, if the medium is fast enough.

Story The story is quiet simple: At first I wrote a program which inplemets a smaller version of the funtion FOUR Only fit on disk, and no buffer option was allowed. I called that program pcopy, which should be stand for part-copy. Two days later I decided to expand the program, to have an multi-function utility. Now it has four functions. And I decided, to call my programm not split, or XXXsplit, beacause there already enough. Thats really all.

Note If you're thinking, that such a tool is useful, and I should upload it to the AmiNet, please mail me.

History Version 1.0 (1997-05-19)
· First release.

0 Responses to “PCopy”


Comments are currently closed.