Dec 252017
 
Cut files into pieces and restore.
File CUT10A.ZIP from The Programmer’s Corner in
Category File Managers
Cut files into pieces and restore.
File Name File Size Zip Size Zip Type
CU-PIF.DVP 416 91 deflated
CUT.DOC 13391 4492 deflated
CUT.EXE 31321 14780 deflated
CUT.PIF 369 56 deflated
OTHERS.DOC 2037 689 deflated

Download File CUT10A.ZIP Here

Contents of the CUT.DOC file


CUT.DOC: Cut v1.0a (c) by Jean Lalonde,
======== Montral, December 1987


INTRODUCTION
------------
You have some files too big to fit on a floppy? 'Cut' allows you
to cut and paste those files. 'Cut' will restore your files with the
same data (with checksum checking), date-time and attributes. 'Cut'
creates two kind of files: the data files and the log files.

The data files are always named 'CUTDATA.nnn' where 'nnn' is a number
from '001' to '999'. Each original file may be splitted in two or more
'CUTDATA.nnn' files. For 'nnn' extension, 'Cut' always uses the smallest
number (starting with '001') that will not overwrite an existing file.
This way, if you cut a file in a directory where 'CUTDATA.nnn' files already
exist with names 'CUTDATA.001' and 'CUTDATA.002', the new data files will
be named 'CUTDATA.003', 'CUTDATA.004', etc.

The log files contain informations about original files and the names
of the files that contain parts of the original file. The log file has the
same name than the original file except for the first character that is
replaced with a tilde ~. For example, the log file for 'FILENAME.EXT' will
be named '~ILENAME.EXT'.

The log files are for 'Cut' use only. You should not modify the
content of those files.


CUTTING WITH PROMPTS
--------------------
'Cut' can be controlled from DOS command line or with prompts. This
second way is the easiest. When you will remember the parameters needed,
you will probably prefer the command line mode.

To call the prompts, enter 'Cut /?'. 'Cut' will ask you the following
questions:

Cut files, Paste files or to end (C) ? C
Enter 'C' or 'P' (if you press , 'Cut' will take the answer
between brackets). The next questions will vary according to this
answer. From here, we will assume that you want to cut ("C") files.

Files to process ('drives:path\files') ? *.*
Enter the name(s) of the files you want to cut. Here, 'Cut' suggests
you the answer "*.*". If you press , 'Cut' will take this
answer. If you enter something else, it will overwrite the suggestion.
If you use wildcards or multiple names (see tips below) to specify
more than one file, only files bigger than the maximal size (specified
later) will be processed.

Destination directory ('drive:path') ?
Enter the drive and directory where the 'CUTDATA.nnn' files will be
created. If you enter an empty string, the data files will be created
in the source directory (the directory of the original file).

Log files directory ('drive:path') ?
Enter the drive and directory where the log files ('~ILENAME.EXT') will
be created. If you enter an empty string, the log files will be
created in the source directory (the directory of the original file).

Maximum size (in kilo-bytes) ?
Enter the maximal size (the number of kilo-bytes) of the data files.
Remember that a kilo-byte is 1,024 bytes and note that the floopies
called "360 kb" are, in fact, 354 kb (354 * 1,024 = 362,496 bytes).
Only files bigger than the maximal size will be processed by 'Cut'.
The data files will be of the maximal size except the last one that
may be smaller.

First output file extension ('nnn'>0) ? 001
Enter the first extension number for 'CUTDATA.nnn'. The range accepted
is 001 to 900. If you enter a number greater than 900, it will be
adjusted to 900. If you enter an empty string, the first number
will be 001 or the first number that will not overwrite an existing
file. Use this feature if you create 'CUTDATA.nnn' files in different
directories and if those files could be copied together in another
directory. This way, you will avoid overwriting of data files

Scan sub-directories (N) ? N
If you answer "Y", 'Cut' will extend its action to files located in
sub-directories (directories under the directory specified at the first
prompt).

Break between each file (N) ? N
Enter "Y" if you want the program to pause between each 'CUTDATA.nnn'
file. It will give you a chance to change the destination floppy.

Delete source files (N) ? N
If you answer "Y", 'Cut' will delete the source (original) files.
Remember that if you lose the log file, only one of the data files
or 'Cut' itself you will be unable to restore those files. For
valuable data, make multiple copies of log and data files and of
'Cut' itself or, if possible, do not delete original files.


PASTING WITH PROMPTS
--------------------
Now, if you want to paste (restore) a cutted file. Let's start again
from the first prompt:

Cut files, Paste files or to end (C) ? P
Enter "P" to paste.

Files to process ('drives:path\files') ? ~*.*
Enter the name(s) of the log file(s) for the files you want to paste
(see tips below). Here, 'Cut' suggests you the answer "~*.*". If
you press , 'Cut' will take this answer.

Destination directory ('drive:path') ?
Enter the drive and directory where the original file(s) will be pasted.
If you enter an empty string, the original file will be pasted in the
source directory (the directory of the log file).

Source files directory ('drive:path') ?
Enter the drive and directory where the data files ('CUTDATA.nnn') will
be read. If you enter an empty string, the data files will be read in
the source directory (the directory of the log file).

Scan sub-directories (N) ? N
If you answer "Y", 'Cut' will extend its action to log files located in
sub-directories.

Break between each file (N) ? N
To pause between each 'CUTDATA.nnn' file.

Delete source files (N) ? N
If you answer "Y", 'Cut' will delete the source data files. Be carefull
with this option: if there is not enough room on you destination disk,
the orginal file will not be pasted BUT the first data files WILL BE
DELETED. Remember that without only one of the data files you will
be unable to restore the original file. For valuable data, delete
data files yourself only after the original file are restored and
verified.


CUTTING FROM COMMAND LINE
-------------------------
'Cut' accepts all the information needed from DOS command line.
To CUT files, enter

'C>Cut /nnn files destDir logDir /.nnn [options]'

'/nnn' maximal size (only 'files' bigger will be processed), there is
no default.

'files' files to cut (multiple drives, path, files and exclusions allowed),
default is all files.

'destDir' where 'CUTDATA.ext' files will be created, default is the source
directory.

'logDir' where log files '~ILENAME.EXT' will be created, default is source
directory.

'/.nnn' first 'CUTDATA' extension to avoid overwriting (0 < 'nnn' <= 900).


PASTING FROM COMMAND LINE
-------------------------
To PASTE files, enter

'C>Cut /P files destDir inputDir [options]'

'/P' pasting switch.

'files' log files to read, default is '~*.*'.

'destDir' where files will be pasted, default is source directory.

'inputDir' where 'CUTDATA.ext' files will be read, default is source
directory.


OPTIONS:

'/B' to break (pause) between each 'CUTDATA.ext' file, default is OFF.

'/D' to delete source files (be sure there is enough output disk space
before using deletion option or you may lose data files), default is
OFF.

'/S' to include 'files' in sub-directories, default is OFF.


EXAMPLE WITH COMMAND LINE
-------------------------
To cut in pieces of 354k an original file named 'FILENAME.EXT' in the
current directory, send 'CUTDATA.nnn' files on drive 'B:', the log file
on drive 'A:' and break between files, enter the command:

'Cut /354 FILENAME.EXT B: A: /B'

Cut v1.0a (c) Jean Lalonde, Montral, December 1987

Cutting .\FILENAME.EXT ...

Press to continue... Creating CUTDATA.001
Press to continue... Creating CUTDATA.002
Result: done

Scanning: fine!

'Cut' will create a log file named '~ILENAME.EXT' on 'A:' and data files
'CUTDATA.nnn' on 'B:'. To paste the original file on drive 'C:' (current
directory) with data files on drive 'B:' and log file on 'A:', enter the
command:

'Cut /P A:~ILENAME.EXT C: B: /B'.

Cut v1.0a (c) Jean Lalonde, Montral, December 1987

Pasting FILENAME.EXT ...
Press to continue... Reading B:CUTDATA.001
Press to continue... Reading B:CUTDATA.002
Result: done

Scanning: fine!

'Cut' will read the log file on 'A:', create the original file on 'C:',
break, read the first data file on 'B:', break, read the second file on 'B:'
and so on until the original file is completely restored. Then, 'Cut' reads
the checksum in the log file and verifies if it match the checksum obtained
during restoring. If it does match, 'Cut' restores original date-time and
attributes. If it does not match, 'Cut' deletes the bad original file.


TIPS ABOUT FILESPECS
--------------------
The filespecs (for files to cut or log files to read) may include the
starting directory name (drive-s, path from root or current's child
directory name allowed). Multiple drives are allowed before ':'.

The filespecs may also include or exclude more than one file
specification: several filenames must be seperated by a '+' and filenames
to exclude may be specified in the last part of filespecs after a '/'
(see examples).

Double side wildcards (such as "*XYZ*.*") will returns all files
matching the pattern anywhere in the given part of the filename.

An empty string is considered as all files and current directory.
If the string ends with a back-slash ('\'), '*.*' is added.

Some filespecs examples:

'' (empty string) for all files ('*.*') in the current directory.

'\' for all files in root directories.

'C:' all files in the drive C:'s current directory.

'\DIR\*.CAT' files ending by '.CAT' in '\DIR'.

'*XYZ*.*' files with the pattern "XYZ" anywhere in the left part of the name.

'*.DAT+*.DTA' files ending by '.DAT' or '.DTA'.

'\*.*/*.COM+*.EXE' for all files except files ending by '.COM' or '.EXE'.

'*.DAT/SOME.DAT' all '*.DAT' files EXCEPT the file 'SOME.DAT'.

'CDE:\*.ARC' for files ending by '.ARC' on root directory of drives C:, D:
and E: (with sub-directory option, it would scan all '*.ARC' files on
drives C:, D: and E:)..


PIF FILES:
---------
'Cut' is provided with PIF (Program Information Files) needed by
Windows (created with version 1.03) and DESQview (created with version
2.00). Those files allow you to run 'Cut' with multi-tasking and windows
environment.

Under Windows and DESQview, 'Cut' is called with the '/?' option.
When you call the program, 'Cut' asks you questions needed until you press
at the first prompt. Then, the window is closed. You will note that
the '/?' option in the DESQview PIF file is entered '/?/' because '?' at
the end of the parameter list would be interpreted as an input request by
DESQview.

The Windows PIF file (CUT.PIF) requires no modification if CUT.EXE is
saved in the current directory or one of the PATH directories. The DESQview
PIF file (CU-PIF.DVP) must be edited (Change Program) to enter the drive and
directory where resides CUT.EXE. In the two cases, 'Cut' is called with
72k of RAM.


HOW TO JOIN ME
--------------

I hope 'Cut' will be usefull to you. I took great care to design
this program without bug, but... you know, nobody is perfect. So, I
can not take any responsability for data destruction caused by this
program.

You can send me comments or reports to:

Jean Lalonde
6667 De Normanville
Montreal
CANADA
H2S-2B8

You can join me online on Compuserve (ID: 76606,671) or on BIX Info
Exchange (Bix name: jlalonde).

'Cut' v1.0 is written in LOGITECH MODULA-2 Compiler, DOS, Rel. 3.00,
Aug 87, Copyright (C) 1983, 1987 LOGITECH, using Logitech's library and my
own library JLModules v1.2.

'Cut' uses standard PC/MS-DOS functions, version 3.00 or more.

You can use or redistribute this program freely as long as it is done
at no cost (except floppy's cost), if this documentation file and the
copyright remain intact. Feel free to send me some money if you like 'Cut'.
Modula-2 sources of this program and of JLModules are available. To receive
those text files, please send me a $25 check.

Enjoy 'Cut'!

Jean Lalonde
December 31, 1987


HISTORY
-------
v1.0 (Dec 30, 87):
First release. Happy new year!
v1.0a (Dec 31, 87):
Checksum bug fixed.

-eof-


 December 25, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)