English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.Other (https://eab.abime.net/forumdisplay.php?f=74)
-   -   How to merge two or more files (https://eab.abime.net/showthread.php?t=93905)

chip 24 August 2018 06:05

How to merge two or more files
 
I would like a simple way to merge two or more files

Something like file1 + file2 = file3 where file3 is exactly composed by file1 filesize + file2 filesize

It would be great something that works like "merge" *.* megafile, where "merge" is the command i'm looking for :-)

jPV 24 August 2018 07:07

AmigaOS comes with the Join command.

Examples from the shell:
Join file1 file2 AS file3
Join file#? AS allfiles
Join #? AS megafile

Also DOpus has a builtin function for joining, and you can just select the files you want to join and click the button.

chip 24 August 2018 08:03

Ok, thanks jpv, it's already something good ;)

But i'm not able to make work the join command with the "#?" special character

It should means *.*, isn't it ?

I get the error "can't open #?" .... what am i doing wrong ?

jPV 24 August 2018 09:39

#? means all files with or without "." character, so practically the same as *.* on MSDOS. But if you only want files which exactly have the "." character, then #?.#? would be more exact, but that's probably not what you want ;)

I think your problem is because AmigaOS 3.1 probably doesn't allow the destination file to be in the same directory, or empty files might cause problems too if trying to join them. I've more used to MorphOS nowadays and it doesn't have these problems...

So, if you're joining files from some directory in HD, try for example this:
Join #? AS RAM:megafile

It should work when megafile goes to some other location than original files. The Join command doesn't allow to include the destination file in the joining process, and that probably happens with #?.

chip 24 August 2018 09:52

I tried with #? and #?.#? with or without :RAM directory

It never works :(

I'm launching this command not from HD, anyway

But from a folder on my PC which is seen by Amiga OS like DH1:

Perhaps this can cause the issue :blased

jPV 24 August 2018 10:25

1 Attachment(s)
Well, works for me. I made a quick test under emulator with a very plain OS3.1 setup, here's a screenshot what I did. Did you have 3.1 or some older AmigaOS?

chip 24 August 2018 10:31

3.1 ROM

Kickstart version 40.68
Workbench version 40.42

AMIGASYSTEM 24 August 2018 10:39

Try these tools, they work very well, I for example often use JoinSplitter to create Double-PNG icons (I combine two images)

Create Double-Sided Icon PNG
https://www.youtube.com/watch?v=Bh78vgnfXgY

jPV 24 August 2018 10:57

Quote:

Originally Posted by chip (Post 1263801)
3.1 ROM

Kickstart version 40.68
Workbench version 40.42

Same as I have then. And my Join command is version 37.1 (10/01/91).

I guess you just have to experiment what's up with your system. Try simple example like I did without using the PC drive etc.

chip 24 August 2018 11:00

Yes, it's probably the PC drive the problem

I will experiment a little

Thanks again ;)

AMIGASYSTEM 24 August 2018 11:34

Quote:

Originally Posted by chip (Post 1263801)
3.1 ROM

Kickstart version 40.68
Workbench version 40.42


It works well to me from Shell

chip 24 August 2018 11:36

It's the command with the "#?" special character that doesn't work :blased

Works fine if i list each files instead ;)

AMIGASYSTEM 24 August 2018 11:41

Equal does not change anything works well with #?

What mistake do you get?

chip 24 August 2018 11:44

I get the error "can't open #?" AMIGASYSTEM

No idea what can be :(

AMIGASYSTEM 24 August 2018 11:54

If you are not in the path, in front of the files you need to merge you must add the path, same thing for the destination, the wildcard must be after the path and no spaces, see screenshot

---- Italiano ----

Se non sei nel percorso, davanti ai file che devi unire devi aggiungere il percorso, stessa cosa per la destinazione, il carattere jolly deve trovarsi dopo il percoso e niente spazi, vedi screenshot

chip 24 August 2018 12:03

I'm in the path

What i write is "join #? as megafile"

As simple as that

But please note that i'm not in the HD but in external PC folder (DH1:-)

ITALIANO

Sono nel percorso

Ciò che scrivo è "join #? as megafile"

Semplicemente quello

Ma per favore nota che non sono nell'HD ma in un'esterna cartella del PC (DH1:-)

PeterK 24 August 2018 12:18

Join probably doesn't support #?, but type does. Don't write the output file into the same directory if you want to use #? for all files, or you may get a recursive loop.

Delete >NIL: somewhere/outputfile
Type inputfiles#? >>somewhere/outputfile

Join inputfiles#? as somewhere/outputfile

... works too, as already suggested here.

meynaf 24 August 2018 12:18

Exact command you should type is "join #? as ram:megafile".

AMIGASYSTEM 24 August 2018 12:51

Quote:

Originally Posted by chip (Post 1263833)
Ma per favore nota che non sono nell'HD ma in un'esterna cartella del PC (DH1:-)


It does not change anything, if you look at the screenshot you will notice that I also used a Windows folder as a volume (Test).
As I showed you in the screenshot and confirmed later you have to give a desination path that in the case of the wildcard not in the same path of the files to be joined.

---- Italiano ----

Non cambia nulla, se guardi lo screenshot noterai che anche io ho usato una cartella di Windows come volume (Test).
Come ti ho mostrato nelo screenshot e confermato dopo devi dare un percorso di desinazione che nel caso del carattere jolly no nello stesso percorso dei file da unire.

chip 24 August 2018 14:03

I written "join dh1:#? as megafile" in a subfolder of DH1: ..... it works ! :p

Thanks AMIGASYSTEM :great


All times are GMT +2. The time now is 20:25.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04812 seconds with 11 queries