FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   File Splitter (https://fileforums.com/showthread.php?t=96490)

Razor12911 01-12-2014 00:35

File Splitter
 
1 Attachment(s)
This programs allows you to split files via command line into equal parts
and merge them whenever you want.

Usage

"Program" "command" "Original file" "File split in mb"
Split.exe s C:\File.ext 12


"Program" "command" "Split-ed file/First Split" "Original File"
Split.exe m C:\File.part1 C:\File.ext

Razor12911 01-12-2014 01:21

Inno Setup Usage

function Splitter(OriginalFile: String; SplitSize: Integer):Boolean;
var
ResultCode: Integer;
begin
if FileExists(ExpandConstant('{tmp}\Split.exe')) = False then
ExtractTemporaryFile('Split.exe');
Result:=Exec(ExpandConstant('{tmp}\Split.exe'), 's "' + ExpandConstant(OriginalFile) + '" "' + IntToStr(SplitSize) + '"', '',
SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;

function Merger(SplitFile, OriginalFile: String):Boolean;
var
ResultCode: Integer;
begin
if FileExists(ExpandConstant('{tmp}\Split.exe')) = False then
ExtractTemporaryFile('Split.exe');
Result:=Exec(ExpandConstant('{tmp}\Split.exe'), 'm "' + ExpandConstant(SplitFile) + '" "' + ExpandConstant(OriginalFile) + '"', '',
SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;

Inge 01-12-2014 01:38

Does not work for me. I see a bit of a second a Window what closed automatic. :(

Razor12911 01-12-2014 01:48

show me your commandline

Inge 01-12-2014 02:44

There is no Commandline. I click the Split.exe, see a Window popping up and close. Nothing more...

Razor12911 01-12-2014 02:55

lol, it is a console app. you must command the program for it to work via CMD

here is an example

Split.exe s C:\File.ext 1024

Inge 01-12-2014 03:35

Ok. Now I know, but don't get it to work. If you make the App a bit more easy to use I will check it out again.

Carldric Clement 01-12-2014 06:59

Quote:

Originally Posted by Razor12911 (Post 436589)
Inno Setup Usage

function Splitter(OriginalFile: String; SplitSize: Integer):Boolean;
var
ResultCode: Integer;
begin
if FileExists(ExpandConstant('{tmp}\Split.exe')) = False then
ExtractTemporaryFile('Split.exe');
Result:=Exec(ExpandConstant('{tmp}\Split.exe'), 's "' + ExpandConstant(OriginalFile) + '" "' + IntToStr(SplitSize) + '"', '',
SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;

function Merger(SplitFile, OriginalFile: String):Boolean;
var
ResultCode: Integer;
begin
if FileExists(ExpandConstant('{tmp}\Split.exe')) = False then
ExtractTemporaryFile('Split.exe');
Result:=Exec(ExpandConstant('{tmp}\Split.exe'), 'm "' + ExpandConstant(SplitFile) + '" "' + ExpandConstant(OriginalFile) + '"', '',
SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;

How to use it the code it?
after was copy in this function,
how to extract it?

gatosky1620 01-12-2014 14:05

how i can integrate split.exe + CIUV2 by yener script

ChronoCross 01-12-2014 14:57

thanks Razor12911

very usefull tool

i want "Freearc Tactical Splitter (Filelist)" in console app too.

Razor12911 01-12-2014 21:22

@Carl
You must first include the exe under files section first.

Example
Splitter(ExpandConstant('{app}\file.ext),1024);
Merger(ExpandConstant('{app}\file.part1),ExpandCon stant('{app}\file.ext));

@gatosky
I am working on the scripts right now bro.

@ChronoCross
I will see.

Carldric Clement 02-12-2014 22:56

Quote:

Originally Posted by Razor12911 (Post 436609)
@Carl
You must first include the exe under files section first.

Example
Splitter(ExpandConstant('{app}\file.ext),1024);
Merger(ExpandConstant('{app}\file.part1),ExpandCon stant('{app}\file.ext));

Done of Include:
Quote:

[Files]
Source: "Include\Split.exe"; DestDir: "{tmp}"; Flags: dontcopy

[Code]
function InitializeSetup: Boolean;
begin
ExtractTemporaryFile('Split.exe');
Result:=True;
end;

Razor12911 02-12-2014 23:40

Yep.

Carldric Clement 03-12-2014 05:25

Quote:

Originally Posted by Razor12911 (Post 436589)
Inno Setup Usage

function Merger(SplitFile, OriginalFile: String):Boolean;
var
ResultCode: Integer;
begin
if FileExists(ExpandConstant('{tmp}\Split.exe')) = False then
ExtractTemporaryFile('Split.exe');
Result:=Exec(ExpandConstant('{tmp}\Split.exe'), 'm "' + ExpandConstant(SplitFile) + '" "' + ExpandConstant(OriginalFile) + '"', '',
SW_HIDE, ewWaitUntilTerminated, ResultCode);
end;

Function Merger was problem.
Like Skip.

Razor12911 03-12-2014 09:13

Quote:

Originally Posted by gatosky1620 (Post 436604)
how i can integrate split.exe + CIUV2 by yener script

It is done, I'll just need a translated message for this:

Merging=Merging %1... (This might take a while)

The only problem is that it is not tested because I edited the script via notepad(I don't have a PC)

@Carldric
Show me how you used Merger function


All times are GMT -7. The time now is 18:19.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com