FIL. - File-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands > FIL. - File-Commands >

FIL. - File-Commands

FIL.Join Delete

Previous Top Next


MiniRobotLanguage (MRL)

 

FIL.Join Delete

Join previously splitted files into a larger file and delete Splits

 

NTFS-Direct

 

Intention

 

This command is used to join the files that have been created with Split File  into the original large file. To join other files, prefer the ATF. - Append-to-File command instead.

This command together with the Split Fil command help to automatically split larger files into smaller pieces. The  command

FIL.Join File

does generally the same like

FIL.Join delete

command to restore the original file. The only difference between these two is, that the first command does not automatically delete the split-files after restoring the original file.

 

Usage of the command is simple:

 

' To split the file

VAF.$$FIA=?path\File.exe

FIL.SPLIT FILE|$$FIA|16000

 

' To Join the file

 

 

 

would split the File into pieces of each 16000 Bytes, Of course the last piece may have a different size, as it contains just the remaining Bytes.

 

Also note that the FIL.Split File command has two dependencies on global settings.

 

Here is an example, how the File-Splitting looks in an explorer folder:

 

 

graphicgraphic

 

On the right side is the content of the "SPL_INFO.txt"-file.

All lines are separated with $crlf$.

 

All the split-files are numbered and have currently the extension "spl".

 

The file "SPL_INFO.txt" contains all informations that are needed for the the

FIL-Join File command to put the files together.

You can see an example, in the picture on the right side.

First it contains the original Filename of the file before it was splitted.

Secondly it contains all the filenames of the splitter-files in the right order.

Any changes you make in the "SPL_INFO.txt" will lead to changes in the final outcome.

There are no additional information on the splitting process in the splitter-files.

Therefore an "SPL_INFO.txt" is needed to concatenate these files to the original file.

 

 

 

 

Syntax

 

 

FIL.Join Delete|P1[|P2]

 

 

Parameter Explanation

 

P1 - Filename and Path to "SPL_INFO.txt" file. Only a path is Ok.

   

P2 - (optional) Variable for 16 Byte-Key for TEA Encryption

    of splitted files. If given this password must of course

    be the same like it was used for decryption.*

 

 

There are 2 dependencies on global settings:

*If "compression and encryption" is used, the size of the resulting files may

be smaller then the given number in P2. To decide whether "compression and encryption" should be used,  Set

OPT.SPLITCOMP|1  

to 0 or 1. The default number of rounds (encryption strength) is 30.

You can change that using

ENCRYPT|100

 

OPT.this will set the default encryption to 100 rounds.

 

 

 

Example

 

'*****************************************************

' EXAMPLE 1: FIL.JoinFile

'*****************************************************

' no compression/encryption (default)

OPT.SPLITCOMP|0

VAF.$$FIA=?path\Textfile.txt

VAF.$$FIB=?path\TextfileX.txt

FIL.SPLIT FILE|$$FIA|160

REN.$$FIA|$$FIB|1000

' automatically delete splitted files after

' restoring the original file

FIL.join delete

ENR.

 

'*****************************************************

' EXAMPLE 2: FIL.JoinFile / FIL.Join Delete

'*****************************************************

' enable compression/Encryption

OPT.SPLITCOMP|1

' Set encryption to 100 TEA Rounds

OPT.ENCRYPT|100

' Time-Measurement

VAR.$$TIA=#dtime#

VAF.$$FIA=?path\Textfile.txt

VAF.$$FIB=?path\TextfileX.txt

FIL.SPLIT FILE|$$FIA|160

ITO.

 goto ero

EIF.

VAR.$$TIB=#dsince#

PRT.Split took:$$TIB

MBX.!

REN.$$FIA|$$FIB|1000

OPT.SPLITCOMP|1

VAR.$$TIA=#dtime#

FIL.join delete

ITO.

 GTO. ero

EIF.

VAR.$$TIB=#dsince#

PRT.Join took:$$TIB

:enx

MBX.!

ENR.

:ero

MBX.Got TIO

GTO. enx

 

 

 

 

Remarks

 

Time considerations:

In my testing environment, I tested to split a file of 6.85 GB into 49 Pieces.

The needed time with compression and encryption was: 10.5 Minutes

The needed time without compression and encryption was: 6.5 Minutes

The time needed to join the file was 8.3 Minutes with compression and encryption

and 6 Minutes without compression and encryption.

 

 

 

Limitations:

 

The Splitter works with 64 bit internally. Therefore files of up to 18446744073709551615 Bytes can be splitted to smaller split-files. But there is a limit on the size of these splitted files.

Due to speed-considerations, the split-files can not exceed ~1-2 GB (depending on the pool of free 32-bit Memory in WOW64).

There is no limit on the number of Split-Files that you can generate (other then 32-bit).

 

 

 

See also:

 

    Split File

    Join File

    OPT. - Optional Settings

    GEC. - Get Encryption

    RMD. - Remove-Directory

    ATF - Append-to-File

    CFF. - Copy-From-File

    CTF - Copy-To-File

    COP. - Copy File

    SHF. - Shell-File-Operation

    MDF. - Make-Direktory-File

    MKD. - Make-Directory

    GLC. - Get-Line-Count

    IEF. / NEF. - If - exist - File

    LFF - Line-From-File

    WFF. - Wait-For-File

    REN. - Rename File/Dir