12th October 1997

FileSplit

FileSplit is a java application that allows to split a file (this file is not modified) in a number of smaller files, specifying the maximum size for each of this chunks.

Its main application is, or at least it was my purpose, to be able to save a big file in some floppys, to carry them out. It is an AWT application, written in 1997, without the nice appearance brought later by Swing.

I updated the application again in 2007, to remove some unused source code, and to avoid clashes with language changes introduced in JDK 1.5 (I used the new enum keyword). But these were the only changes since the original OLD code! I didn't even the reference to the original web site or my old email (call it nostalgy?)

Installation

FileSplit is available in a .jar file, that must be appended to the classpath.

For example, in a Windows System, if the file has been copied in C:\JAVA\LIB\SplitFile.jar, the classpath must be something like:

CLASSPATH=…….;C:\JAVA\LIB\SplitFile.jar

SplitFile is a java file compiled with JDK1.1.4; to use it, you must have a java virtual machine 1.1.x: the JDK 1.1.x or the JRE 1.1.x (the java rutime environment), for example.

Availability

SplitFile is freeware. There is no warranty in the program, but you can use with complete freedom, or or modify it, as the source code is available as well.

  • bytecode distribution: SplitFile.jar (54 KB)
  • source code: SplitFile.zip (30 KB). It compiles with JDK 1.4 showing some deprecated API usage.

Instructions

To split a file, it is needed to specify:

  • The file to split. (it is not modified)
  • The target path; where to create these chunks; these chunks will have the name targetpath.X, being X the chunk number.
  • Maximum size for each chunk.
The application also creates a batch file that allows to the user to merge the created chunks and get the original file. It is possible to specify the kind of batch to create:
  • Windows platform: it creates a .bat file, with name targetpath.bat
  • Unix platform: it creates a sh script with name targetpath.merger

To make easier the use of Split File, it uses -only in the window interface- a settings file. This file is stored in the directory given by the HOME property, with the name SplitFile.properties.

Using FileSplit

To start SplitFile, it is needed to have properly set the classpath, as is explained in the installation section. FileSplit is started with:

java SplitFile.Prg.fs [arguments]

There are two ways to use SplitFile:

  • With arguments: it is executed from the command line, without any window interface. In this case, the allowed arguments are:
    [options] File_to_split [Target_path=File_to_split]
    

    Where options are:

    • noecho: no information will be displayed
    • script: a script file (and not a bat file) is created
    • size=xxx: defines de max size of each chunk (by default is a 3"1/2 floppy size)
  • Without arguments: it presents a window interface to get the parameters needed.