Tuesday, January 2, 2018
How to Split a File Into Unequal Parts
How to Split a File Into Unequal Parts
There are many utilities around the internet, which split files (and later merge them) into multiple parts, for various purposes, like uploading it part by part, or fitting it part-by-part into storage devices like CD�s, USB storage, etc. There are tons of them on the web, like HJ Split, File Splitter, GSplit, etc. However, the biggest disadvantage when it comes to these file splitters are that they split files into equal parts.
If you want to split your file into unequal parts, then you would have to go an extra step. HJ Split�s also offers a java version, which offers the option of splitting file unequally. Unfortunately, only a command line interface is supported for this feature. This works in all operating systems, alike [Thanks to Java, of course]. I will explain the following for Windows OS, others can alter yours, as per your requirements.

While combining, you can use the GUI version of HJ Split and select the �Join� files option to join the files normally.
If you want to split your file into unequal parts, then you would have to go an extra step. HJ Split�s also offers a java version, which offers the option of splitting file unequally. Unfortunately, only a command line interface is supported for this feature. This works in all operating systems, alike [Thanks to Java, of course]. I will explain the following for Windows OS, others can alter yours, as per your requirements.
Requirements:
You need to download :- the compiled java file of HJ Split java version
- Java SDK [Software Development kit] *
[*There is a difference between the JRE and SDK. You most probably wouldn�t have installed this, so I request you to download it right away. Downloading this is the only time consuming process in this whole process.]
Steps:
- Download and install the Java SDK version (Again, this is different from the JRE version you have, so download it). Copy the location of where you have installed this. [If you can�t find it, look in the Program Files directory].
- Open Command Prompt (Windows) , or the terminal (Unix, Linux or Mac).
- Move the HJ Split file you downloaded to somewhere in the C:/ folder, like C:/HJSplit
- Next, You need to execute the following commands in the command prompt:
cd C:
(This is take you to the C:/ root folder)cd HJSplit
(This will take you to the directory while the downloaded .class file is)dir
(Use this to check whether the file is present in the folder)set path=%path%;C:Program FilesJavajdk1.7.0 in
(This command is important to run the file later. The red color text tells where you installed the SDK) See Screenshot. - Next, You need to select the file which you would want to split and place it within the same folder HJSplit. This is important. [Let my example file by test.zip]
- Now, you need to fix upon how you want to divide the file.
Lets say you have a 100 MB file and you would want to split it to 50 MB, 35 MB and 15 MB. Open your calculator and multiply each number by 1024 to convert it into Kilobytes (KB). Now, the numbers are: 51200, 35840 and 15360 respectively. - According to the values, run this final command:
java HJSplit �s51200,35840,15360 test.zip
[Note that the �s� is important and should not be missed out.] Screenshot. - Note: For some reasons, if the command doesn�t work, try typing the command manually into the command prompt.
While combining, you can use the GUI version of HJ Split and select the �Join� files option to join the files normally.
This article is from TechCovered - The Technology Blog.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.