home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / SPFL11.ZIP / SPLFL11.TXT < prev    next >
Text File  |  1990-12-21  |  15KB  |  297 lines

  1.                          ***SPLIT-FILE ***
  2.                            Version 1.10
  3.                                  
  4.  
  5.  
  6.      Surprisingly, with all the shareware programs in the world, I
  7. was never able to find a file-splitting utility with the
  8. flexibility and ease of use I wanted.  My only solution was to
  9. write my own.  This program, "SPLIT-FILE" is the result.  It is a
  10. DUAL-MODE program that works just as well under DOS as it does
  11. under protected mode OS/2.  No other file splitting utility I've
  12. found can do that!
  13.  
  14.      Because I wrote this program primarily for myself, I am
  15. releasing it into the public domain as a favor to others, without
  16. any requests for remuneration.  So, use it and enjoy it without
  17. guilt!  I would however like to hear from anyone who may have
  18. problems with it so I may correct them in future versions.
  19.  
  20.      The source code for this program is also free via diskette to
  21. anyone who wants it but because of the costs of diskette media and
  22. mailing, I must ask that $4.00 accompany any request.  Mail your
  23. request to:
  24.                     Don Perry
  25.                     P.O. Box 835
  26.                     Pleasanton, CA  94566-0083
  27.                     (415) 462-0798
  28.  
  29.  
  30. PROGRAM OVERVIEW
  31.  
  32.      There are many reasons to split large files but the two main
  33. ones I've found are to (1) allow transferring to removeable media
  34. (floppy disks) for transporting or archival purposes or (2) to
  35. split large text files for easier manipulation by word processors,
  36. text editors or other programs.  SPLIT-FILE makes both types easy
  37. by operating differently depending whether the destination of the
  38. split files is going to removable (floppy) or fixed (hard disk)
  39. media.  It assumes that when writing to floppy you want to cram as
  40. much of the file as possible on each floppy and defaults to that
  41. end (although you can specify a specific reserve amount be left on
  42. each one with one of the options.)  When writing to fixed media (a
  43. hard disk) it simply splits the source file(s) into as many files
  44. as necessary to a default size of 50,000 bytes or the size chosen
  45. in the option switch /s:?.
  46.  
  47.      SPLIT-FILE has a myriad of options.  For instance, when
  48. writing to floppies, you have the option of clearing the entire
  49. target floppy before writing, determining a reserve amount of space
  50. to be left on the diskette and to change the volume label on the
  51. target to either a name of your choosing or automatically to the
  52. filename sequence of the file you are splitting.  You can also
  53. choose the level of erasure verification of the target media.  A
  54. new option has been added with version 1.1 to specify that the
  55. target diskettes or files only be split at the end of a line when
  56. splitting text files.
  57.      SPLIT-FILE will also accept more than one source file for
  58. splitting at a time.  It will either combine these multiple files
  59. in the order you specify into one 'split set' or create a new set
  60. for each new source file as a time saving feature rather than run
  61. the program multiple times.
  62.  
  63.  
  64. PROGRAM OPERATION
  65.  
  66.      SPLIT-FILE's operation is controlled solely from the command
  67. line via command line switches.  This makes it possible to simplify
  68. its operation by creating reusable batch files for splitting
  69. different types of files. (Examples are given later).
  70.  
  71. The command line switches are as follows:
  72.  
  73.    Switch          Description                    Default
  74.    ------          -----------                    -------
  75.    /d:?:     ?=Target drive designation           A: 
  76.    /t:?      ?=Target filename                    source filename
  77.    /n        New file for each source             NO
  78.    /c        Clear target drive first             NO
  79.    /v:?      ?=New Volume label text              unchanged
  80.    /r:?      ?=Reserve amount on target disk      0 bytes
  81.    /x        Skip target erase verification       NO
  82.    /b        Split files at line endings only     NO
  83.    /s:?      ?=Size of target hard disk files     50,000 bytes
  84.  
  85. /d:? DRIVE - Selects the target drive for the target file
  86.      fragments.  If none is specified, the drive is assumed to be
  87.      A:.  The program automatically determines whether your choice
  88.      is a floppy or a hard disk.  It is important to remember the
  89.      colon before and after your drive letter choice.
  90.  
  91. /t:? TARGET FILENAME - Specifies the name to use for the fragment
  92.      files.  You can only choose the filename, not the extension as
  93.      the extension will be determined automatically by the program
  94.      to be numbers from .001 to .999 depending on the number of
  95.      fragment files it has to create.  If a target filename is not
  96.      specified, it defaults to the name of the first specified
  97.      source file.
  98.  
  99. /n  NEW SET EACH FILE - Specifies that you want SPLIT-FILE to
  100.      create a new set of file fragments for each source file
  101.      specified.  If you specify only one source file, this option
  102.      has no effect.
  103.  
  104. /c  CLEAR TARGET DRIVE - When the target drive is a floppy, this
  105.      switch specifies that you want it erased completely including
  106.      any sub-directories before the writing of the file fragments .
  107.      As a precaution however, it will not erase any read-only
  108.      files.  This option will not work on a hard drive destination.
  109. /v:? VOLUME NAME - Specifies the name to use on the target floppy
  110.      up to 11 characters.  The name will be converted into upper
  111.      case.  The name can include spaces but if it does, make sure
  112.      it is enclosed in quotes as in "MY DISK".  As an alternative,
  113.      if you specify a plus sign (/v:+), SPLIT-FILE will name the
  114.      volume the same as the target filespec for that floppy.  Also
  115.      if you specify a minus sign (/v:-), the volume name on the
  116.      target will be removed completely.  This option has no effect
  117.      on hard drive destinations.
  118.  
  119. /r: RESERVE AMOUNT - Specifies the amount of space to leave on the
  120.      floppy destination drive from 0 to 65535 bytes.  This space
  121.      will be left on each floppy for the set.  It is useful if you
  122.      want to add other information or edit the file fragments
  123.      between themselves later.  This option has no effect on hard
  124.      drive destinations.
  125.  
  126. /x  NO ERASE VERIFICATION - This option eliminates the prompting of
  127.      whether or not you want to erase the target floppy drive when
  128.      used with the /c option.  Its use makes file splitting faster
  129.      but is more dangerous.  This option has no effect on hard
  130.      drive destinations.
  131.  
  132. /b  SPLIT AT LINE ENDINGS - This forces files to be split at line
  133.      endings only.  With the /b option specified, files will be
  134.      split at the last Carriage Return that can be found before the
  135.      maximum size of the target disk (or file if splitting to a
  136.      hard disk) is reached.  When splitting to diskettes, because
  137.      it splits at line endings only, a little unused space is left
  138.      on each target disk.  And when spltting to hard disks, the /b
  139.      option results in target files of slightly different sizes for
  140.      the same reason.  This options should only be used for text
  141.      files.  It is useless with binary files.
  142.  
  143. /s: SIZE OF DESTINATION FILES - Specifies the actual size of the
  144.      target hard disk files.  This number can be any size.  If the
  145.      /s: option is not used, the default hard disk file size is
  146.      50,000 bytes.  This option is operational only with hard drive
  147.      destinations.
  148.  
  149.  
  150. EXAMPLE USES:
  151.  
  152.      1>  You want to split a 2,000,000 byte hard disk file onto
  153. 360K floppies.  The target drive B: is a regular 360K floppy.  The
  154. source filename is BIGFILE.TXT and it is in the current directory
  155. of your hard disk.  You want the volume labels of the target
  156. floppies to be named IM GEORGE.  You want to clear the target
  157. floppies before writing and you do not want any reserve bytes on
  158. the floppies.  The syntax would be:
  159.          splitfile bigfile.txt /d:b: /v:"im george" /c
  160.  
  161. This would result in the creation of 6 floppy diskettes, on each
  162. diskette, a single file would be created named bigfile.001 on
  163. diskette #1, bigfile.002 on diskette #2 etc.  The volume label on
  164. each diskette would be changed to IM GEORGE.  The first 5 diskettes
  165. would be filled to capacity (about 362496 bytes) and the 6th would
  166. fill up to the remainder (about 187520 bytes).
  167.  
  168.      2>  You have two files named MYFILE1.DOC which is 400,000
  169. bytes and MYFILE2.DOC which is 600,000 bytes in the current
  170. directory of your hard drive.  You want to combine and then split
  171. them into 360k floppies on drive B: as in example #1 above but now
  172. you also want to change the volume name of the diskettes to the
  173. same as the target files and to leave 8192 bytes on each target
  174. diskette for later editing.
  175. The syntax would be:
  176.     spltfile myfile1.txt myfile2.txt /d:b: /v:+ /r:8192 /c
  177.  
  178. This would result in the creation of 3 diskettes, the first
  179. diskette would have a single file named myfile1.001 (of about
  180. 354304 bytes) with 8192 bytes left and the volume name would be
  181. MYFILE1_001.  The second diskette would be the same except the
  182. filename would be myfile1.002 and the volume label MYFILE1.002.
  183. The third diskette would have a file named myfile1.003 (of about
  184. 291392 bytes) and a volume name of MYFILE1_003.  Note that the file
  185. myfile1.002 on the second diskette will be a combination of both
  186. source files myfile1.txt and myfile2.txt being concatenated
  187. together.
  188.  
  189.      3>  Same example as #2 above but you want myfile1.txt and
  190. myfile2.txt to be two separate file fragment sets.
  191. The syntax would be:
  192.      spltfile myfile1.txt myfile2.txt /d:b: /v:+ /r:8192 /c /n
  193.  
  194. Now, you would get a total of four diskettes, the first same as in
  195. example #2 above but now the file on the second diskette
  196. (myfile1.002) is now only 45696 bytes.  The file on the third
  197. diskette would be named myfile2.001 (instead of myfile1.003) and
  198. the file on the forth named myfile2.002.  There is now no combining
  199. of the files.  With the "/n" option chosen, it is effectively the
  200. same as doing two separate file splits for both myfile1.txt and
  201. myfile2.txt.  It is just a way to save time.
  202.  
  203.      4>  There is a very large file named immense.txt which is
  204. 4,000,000 bytes long in the root directory of your hard drive C:
  205. and you want to split it into files exactly 124,677 bytes each in
  206. your current directory.  (Spltfile.exe is there too or it is
  207. identified in a directory named in your path environment variable.)
  208. The syntax is:
  209.            spltfile \immense.txt /d:c: /s:124677
  210.  
  211. This will result in the creation of 33 files named immense.001 to
  212. immense.033 respectively in your current directory.  The first 32
  213. will be exactly 124677 bytes long and the last will be 10336 bytes
  214. long.  Note that when a hard disk is the destination, SPLIT-FILE
  215. always writes the file fragments into the current directory.
  216.  
  217.      5>  You have a large text file of 1,000,000 bytes called
  218. lotoftxt.doc that you would like to split to your B: drive which is
  219. a 360K floppy but you don't want the text at the separation points
  220. of the split files to be broken between words or lines.
  221. The syntax is:
  222.            splitfile lotoftxt.doc /d:b: /b
  223.  
  224. This will split lotoftxt.doc onto approximately three 360K floppies
  225. each with a single file named lotoftxt.001 to lotoftxt.003.  Each
  226. of these files are separated at the end of a line. And because of
  227. this end of line division, each diskette has a little of unused
  228. space left, depending on the length of lines and the arbitrary
  229. positioning of the carriage returns used in lotoftxt.doc.
  230.  
  231.  
  232. FILE CONDENSING UTILITIES
  233.  
  234.      SPLIT-FILE is not, nor does it claim to be a replacement for
  235. file condensing / archiving utilities such as SEAWARE'S ARC.EXE
  236. utility or PKWARE'S PKZIP.EXE utility.  SPLIT-FILE simply splits
  237. files unchanged into smaller ones.  It is primarily for use on
  238. ASCII text files but can be used effectively on ANY file including
  239. large condensed archives themselves.  For example, a large
  240. condensed archive of data you want to send your co-worker is
  241. 424,676 bytes long.  His (or her) computer has only 360K floppy
  242. drives and a hard disk.  Instead of taking apart your condensed
  243. archive and creating two smaller ones, simply run SPLIT-FILE to
  244. create two floppies as in example #1 above.  Your co-worker can
  245. copy these diskettes to his (or her) hard disk and put them back
  246. together with the DOS or OS/2 copy command as:
  247.      copy bigfile.001 /b + bigfile.002 /b  bigfile.zip
  248.  
  249.  
  250. USE AS POOR MANS CD WORM*
  251.  
  252.      SPLIT-FILE is really great for BBS users who save their BBS
  253. sessions to log files.  Over time, these files can grow quite large
  254. and take up quite a bit of hard disk space.  You don't want to
  255. delete them though because there is a lot of information you
  256. remember reading in them of value.  The solution?  Use SPLIT-FILE
  257. to write these archives to floppies.  With the volume option they
  258. will be consecutively numbered and easy to keep in order.  You can
  259. then use a text list and/or search utility like Vern Buerg's LIST
  260. or Peter Norton's TS (text search) program to thumb through these
  261. floppies.  If you have a HD 1.44 mb diskette, quite a bit of
  262. information can be stored on them at one time.  SPLIT-FILE is
  263. better for this purpose than a backup or archive utility because
  264. you need not reconstruct the files to the hard disk first to read
  265. them.
  266.  
  267. * a CD WORM is a laser disk "Write Once Read Many" mass storage
  268. device capable of storing many megabytes of information for random
  269. retrieval.  WORM disks are available for Dictionaries, Thesauruses,
  270. etc.
  271. CHANGES FROM VERSION 1.00 to 1.10
  272.      SPLIT-FILE now runs on the entire family of computers with
  273. Intel processors from 8088 to 80486.  The original 1.0 version only
  274. worked with the 80286 and above.
  275.  
  276.      File splitting at line ends has been added as an option for
  277. text files so that the target diskettes or files are not cut off
  278. exactly at their size limit (whether or not it happens to be in the
  279. middle of a word or line) but instead are always split between
  280. complete lines.
  281.  
  282.  
  283. USE UNDER OS/2
  284.  
  285.      This program was written as a dual mode program that runs
  286. under OS/2 and DOS.  If used under OS/2, it will run in it's own
  287. window under the Presentation Manager interface and multiple
  288. sessions of SPLIT-FILE can be run simultaneously.  If you are using
  289. OS/2 specifically, you may get an OS/2 specific version of this
  290. program by sending $4.00 to:
  291.                     Don Perry
  292.                     P.O. Box 835
  293.                     Pleasanton, CA  94566-0083
  294.                     (415) 462-0798
  295.                     CompuServe ID: 76676,1127
  296.      Please specify disk format (5.25 or 3.5) desired.
  297.