A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » New Users to Windows XP
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do you tag one file onto the end of another?



 
 
Thread Tools Display Modes
  #1  
Old October 25th 09, 10:05 AM posted to microsoft.public.windowsxp.newusers
J. P. Gilliver (John)
external usenet poster
 
Posts: 5,291
Default How do you tag one file onto the end of another?

I know one way to join files: in a command box,

copy /b filea+fileb filec

.. However, if filea is huge, this takes a noticeable time, because the
entirety of filea is copied to filec (followed by fileb, obviously).

I know with text files, you can just append things to another file - e.
g.

dir filea

will I think append a directory listing to filea, or

type fileb filea

will append fileb to filea - but only if it's a text file.

Anyone know how to concatenate arbitrary files, without involving a
third file?
--
J. P. Gilliver. UMRA: 1960/1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf
** http://www.soft255.demon.co.uk/G6JPG-PC/JPGminPC.htm for ludicrously
outdated thoughts on PCs. **

Mathematics is the language with which God has written the universe. -Galileo
Galilei, physicist and astronomer (1564-1642)
Ads
  #2  
Old November 1st 09, 11:07 AM posted to microsoft.public.windowsxp.newusers
Anteaus
external usenet poster
 
Posts: 1,330
Default How do you tag one file onto the end of another?

This task is probably a little beyond batch language. I would suggest trying
AutoIt's FileWrite command, which can append data to an existing file.

http://autoitscript.com

"J. P. Gilliver (John)" wrote:

Mathematics is the language with which God has written the universe. -Galileo
Galilei, physicist and astronomer (1564-1642)


A surprising example to choose, in view of what the Inquisition did to
Galileo for the simple act of publishing his understandings of our solar
system.

http://www.pbs.org/wgbh/nova/galileo/life.html

It is possible that if Galileo had not done so, science would have remained
the province of underground 'heretics' and that today there would be no
computers, nothing of modern tech, for that matter. Instead we'd all be
living like Harrid and Sallis of Ver Ager, in an enforced state of
mediaevalism designed to secure the power of the ecclesiastical rulers.

We all owe a great deal to Galileo, not just as a scientist but as a
proponent of free speech and human-rights. Today, whenever you speak your
mind freely about the nature of the universe... or about anything - think of
Galileo.

  #3  
Old November 1st 09, 11:07 AM posted to microsoft.public.windowsxp.newusers
Anteaus
external usenet poster
 
Posts: 1,330
Default How do you tag one file onto the end of another?

This task is probably a little beyond batch language. I would suggest trying
AutoIt's FileWrite command, which can append data to an existing file.

http://autoitscript.com

"J. P. Gilliver (John)" wrote:

Mathematics is the language with which God has written the universe. -Galileo
Galilei, physicist and astronomer (1564-1642)


A surprising example to choose, in view of what the Inquisition did to
Galileo for the simple act of publishing his understandings of our solar
system.

http://www.pbs.org/wgbh/nova/galileo/life.html

It is possible that if Galileo had not done so, science would have remained
the province of underground 'heretics' and that today there would be no
computers, nothing of modern tech, for that matter. Instead we'd all be
living like Harrid and Sallis of Ver Ager, in an enforced state of
mediaevalism designed to secure the power of the ecclesiastical rulers.

We all owe a great deal to Galileo, not just as a scientist but as a
proponent of free speech and human-rights. Today, whenever you speak your
mind freely about the nature of the universe... or about anything - think of
Galileo.

  #4  
Old November 1st 09, 03:41 PM posted to microsoft.public.windowsxp.newusers
J. P. Gilliver (John)
external usenet poster
 
Posts: 5,291
Default How do you tag one file onto the end of another?

In message , Anteaus
writes:
This task is probably a little beyond batch language. I would suggest trying
AutoIt's FileWrite command, which can append data to an existing file.

http://autoitscript.com


Thanks for that; I suspect it's too complicated for the person I had in
mind.

I have a friend who - for reasons we needn't go into here - concatenates
files (usually video files), by the simple expedient of

copy /b filea+fileb filec

which does the trick (and more quickly than loading them into a video
editing prog. - he knows what he's doing); however, I was watching him
do it once when filea was much bigger than the others (there were
actually several), and it seemed a pity to have to wait for the system
to copy the huge filea, when all he wanted was the others stuck onto the
end of it (he didn't have any need for filea to be retained unmodified).
Especially when I know that the "" operator works for text files - as
in

dir filez.txt

will tag the output of the dir command onto the end of filez.txt (much
as dir filez.txt will create filez.txt and then put the dir output
into it).

I found/find it odd that this facility works, but only for text files;
the mechanism is already there, obviously, but I can't see any way round
it. Ho hum.

"J. P. Gilliver (John)" wrote:

Mathematics is the language with which God has written the universe. -Galileo
Galilei, physicist and astronomer (1564-1642)


A surprising example to choose, in view of what the Inquisition did to
Galileo for the simple act of publishing his understandings of our solar
system.


Hmm, the choice of that quote had nothing to do with the subject of the
thread - they're picked at random (by an ancient DOS utility called
Tomsystems Quote!) from a file of such that I have accumulated over the
years. If you mean it's odd of itself, I just thought it was a pleasing
thought; Galileo himself, I suspect, either doubted the existence of God
and just thought it was a clever thing to say, or didn't think the
Inquisition represented God.
[]
It is possible that if Galileo had not done so, science would have remained
the province of underground 'heretics' and that today there would be no
computers, nothing of modern tech, for that matter. Instead we'd all be
living like Harrid and Sallis of Ver Ager, in an enforced state of
mediaevalism designed to secure the power of the ecclesiastical rulers.


One fears that this is at least a consequence - if not consciously the
actual aim - of some of the more extreme extremists in some countries.
(Even including Christians - some of them are very against research/work
in certain areas. But that is getting way off-topic, especially for a
newusers 'group.)

We all owe a great deal to Galileo, not just as a scientist but as a
proponent of free speech and human-rights. Today, whenever you speak your
mind freely about the nature of the universe... or about anything - think of
Galileo.

Indeed. (And others, of course.)
--
J. P. Gilliver. UMRA: 1960/1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf
** http://www.soft255.demon.co.uk/G6JPG-PC/JPGminPC.htm for ludicrously
outdated thoughts on PCs. **

"I'm a self-made man, but I think if I had to do it over again, I'd call in
someone else." - Roland Young
  #5  
Old November 1st 09, 03:41 PM posted to microsoft.public.windowsxp.newusers
J. P. Gilliver (John)
external usenet poster
 
Posts: 5,291
Default How do you tag one file onto the end of another?

In message , Anteaus
writes:
This task is probably a little beyond batch language. I would suggest trying
AutoIt's FileWrite command, which can append data to an existing file.

http://autoitscript.com


Thanks for that; I suspect it's too complicated for the person I had in
mind.

I have a friend who - for reasons we needn't go into here - concatenates
files (usually video files), by the simple expedient of

copy /b filea+fileb filec

which does the trick (and more quickly than loading them into a video
editing prog. - he knows what he's doing); however, I was watching him
do it once when filea was much bigger than the others (there were
actually several), and it seemed a pity to have to wait for the system
to copy the huge filea, when all he wanted was the others stuck onto the
end of it (he didn't have any need for filea to be retained unmodified).
Especially when I know that the "" operator works for text files - as
in

dir filez.txt

will tag the output of the dir command onto the end of filez.txt (much
as dir filez.txt will create filez.txt and then put the dir output
into it).

I found/find it odd that this facility works, but only for text files;
the mechanism is already there, obviously, but I can't see any way round
it. Ho hum.

"J. P. Gilliver (John)" wrote:

Mathematics is the language with which God has written the universe. -Galileo
Galilei, physicist and astronomer (1564-1642)


A surprising example to choose, in view of what the Inquisition did to
Galileo for the simple act of publishing his understandings of our solar
system.


Hmm, the choice of that quote had nothing to do with the subject of the
thread - they're picked at random (by an ancient DOS utility called
Tomsystems Quote!) from a file of such that I have accumulated over the
years. If you mean it's odd of itself, I just thought it was a pleasing
thought; Galileo himself, I suspect, either doubted the existence of God
and just thought it was a clever thing to say, or didn't think the
Inquisition represented God.
[]
It is possible that if Galileo had not done so, science would have remained
the province of underground 'heretics' and that today there would be no
computers, nothing of modern tech, for that matter. Instead we'd all be
living like Harrid and Sallis of Ver Ager, in an enforced state of
mediaevalism designed to secure the power of the ecclesiastical rulers.


One fears that this is at least a consequence - if not consciously the
actual aim - of some of the more extreme extremists in some countries.
(Even including Christians - some of them are very against research/work
in certain areas. But that is getting way off-topic, especially for a
newusers 'group.)

We all owe a great deal to Galileo, not just as a scientist but as a
proponent of free speech and human-rights. Today, whenever you speak your
mind freely about the nature of the universe... or about anything - think of
Galileo.

Indeed. (And others, of course.)
--
J. P. Gilliver. UMRA: 1960/1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf
** http://www.soft255.demon.co.uk/G6JPG-PC/JPGminPC.htm for ludicrously
outdated thoughts on PCs. **

"I'm a self-made man, but I think if I had to do it over again, I'd call in
someone else." - Roland Young
  #6  
Old November 7th 09, 04:56 PM posted to microsoft.public.windowsxp.newusers
Richard[_12_]
external usenet poster
 
Posts: 429
Default How do you tag one file onto the end of another?

"J. P. Gilliver (John)" wrote in message
...
I know one way to join files: in a command box,

copy /b filea+fileb filec

. However, if filea is huge, this takes a noticeable time, because
the entirety of filea is copied to filec (followed by fileb,
obviously). I know with text files, you can just append things to
another file - e. g.

dir filea

will I think append a directory listing to filea, or

type fileb filea

will append fileb to filea - but only if it's a text file.

Anyone know how to concatenate arbitrary files, without involving a third
file?


To append fileB to fileA:

copy /b fileA+fileB fileA

FWIW. --Richard



  #7  
Old November 7th 09, 04:56 PM posted to microsoft.public.windowsxp.newusers
Richard[_12_]
external usenet poster
 
Posts: 429
Default How do you tag one file onto the end of another?


"J. P. Gilliver (John)" wrote in message
...
I know one way to join files: in a command box,

copy /b filea+fileb filec

. However, if filea is huge, this takes a noticeable time, because
the entirety of filea is copied to filec (followed by fileb,
obviously). I know with text files, you can just append things to
another file - e. g.

dir filea

will I think append a directory listing to filea, or

type fileb filea

will append fileb to filea - but only if it's a text file.

Anyone know how to concatenate arbitrary files, without involving a third
file?


To append fileB to fileA:

copy /b fileA+fileB fileA

FWIW. --Richard



  #8  
Old November 8th 09, 01:40 AM posted to microsoft.public.windowsxp.newusers
J. P. Gilliver (John)
external usenet poster
 
Posts: 5,291
Default How do you tag one file onto the end of another?

In message , Richard
writes:

"J. P. Gilliver (John)" wrote in message
...
I know one way to join files: in a command box,

copy /b filea+fileb filec

. However, if filea is huge, this takes a noticeable time, because
the entirety of filea is copied to filec (followed by fileb,
obviously). I know with text files, you can just append things to
another file - e. g.

dir filea

will I think append a directory listing to filea, or

type fileb filea

will append fileb to filea - but only if it's a text file.

Anyone know how to concatenate arbitrary files, without involving a third
file?


To append fileB to fileA:

copy /b fileA+fileB fileA

FWIW. --Richard



Won't that still go through the motions of copying every byte of fileA,
even if it's putting the results back in the same place?
--
J. P. Gilliver. UMRA: 1960/1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf
** http://www.soft255.demon.co.uk/G6JPG-PC/JPGminPC.htm for ludicrously
outdated thoughts on PCs. **

Archduke Ferdinand found alive - First World War a mistake!
  #9  
Old November 8th 09, 01:40 AM posted to microsoft.public.windowsxp.newusers
J. P. Gilliver (John)
external usenet poster
 
Posts: 5,291
Default How do you tag one file onto the end of another?

In message , Richard
writes:

"J. P. Gilliver (John)" wrote in message
...
I know one way to join files: in a command box,

copy /b filea+fileb filec

. However, if filea is huge, this takes a noticeable time, because
the entirety of filea is copied to filec (followed by fileb,
obviously). I know with text files, you can just append things to
another file - e. g.

dir filea

will I think append a directory listing to filea, or

type fileb filea

will append fileb to filea - but only if it's a text file.

Anyone know how to concatenate arbitrary files, without involving a third
file?


To append fileB to fileA:

copy /b fileA+fileB fileA

FWIW. --Richard



Won't that still go through the motions of copying every byte of fileA,
even if it's putting the results back in the same place?
--
J. P. Gilliver. UMRA: 1960/1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf
** http://www.soft255.demon.co.uk/G6JPG-PC/JPGminPC.htm for ludicrously
outdated thoughts on PCs. **

Archduke Ferdinand found alive - First World War a mistake!
  #10  
Old November 8th 09, 02:45 PM posted to microsoft.public.windowsxp.newusers
Jim[_40_]
external usenet poster
 
Posts: 12
Default How do you tag one file onto the end of another?

I've been following this correspondence with interest, since, for a reason
which escapes me now, I used to append one text file to another back in the
days of DOS.

However, one thing escapes me : apart from text files (under which term I
include program source code and anything else in text), what would be the
point of appending one file to another?

Jim


  #11  
Old November 8th 09, 02:45 PM posted to microsoft.public.windowsxp.newusers
Jim[_40_]
external usenet poster
 
Posts: 12
Default How do you tag one file onto the end of another?

I've been following this correspondence with interest, since, for a reason
which escapes me now, I used to append one text file to another back in the
days of DOS.

However, one thing escapes me : apart from text files (under which term I
include program source code and anything else in text), what would be the
point of appending one file to another?

Jim


  #12  
Old November 9th 09, 06:12 PM posted to microsoft.public.windowsxp.newusers
Richard[_12_]
external usenet poster
 
Posts: 429
Default How do you tag one file onto the end of another?

"J. P. Gilliver (John)" wrote in message
...
I know one way to join files: in a command box,

copy /b filea+fileb filec

. However, if filea is huge, this takes a noticeable time, because
the entirety of filea is copied to filec (followed by fileb,
obviously). I know with text files, you can just append things to
another file - e. g.

dir filea

will I think append a directory listing to filea, or

type fileb filea

will append fileb to filea - but only if it's a text file.

Anyone know how to concatenate arbitrary files, without involving a
third file?


In message , Richard
writes:

To append fileB to fileA:

copy /b fileA+fileB fileA

FWIW. --Richard




"J. P. Gilliver (John)" wrote in message
...

Won't that still go through the motions of copying every byte of fileA,
even if it's putting the results back in the same place?


Hi again John,

(Actually, I used such small test files it was too fast to tell.

Here's the output of my 2 tests:
C:\copy /a test1.txt+test2.txt test1.txt
test1.txt
test2.txt
1 file(s) copied.

C:\type test1.txt
This is test1...
This is test2...

C:\copy /a test1.txt+test2.txt+test3.txt test1.txt
test1.txt
test2.txt
test3.txt
1 file(s) copied.

C:\type test1.txt
This is test1...
This is test2...
This is test2...
This is test3...

Note that it says only "1 file(s) copied."

(We need bigger guns...

Made a copy of a 120MB exe file as trial1.exe (took more than 2 seconds)
Made a copy of a 5MB exe file as trial2.exe (took less than a second)
C:\copy /b trial1.exe+trial2.exe trial1.exe

took less than a second to append 5MB to 120MB file to get 125MB
Deleted both trial*.exe files.

Copied 120MB exe file as trial1.exe again
Copied 5MB exe file as trial2.exe again
C:\copy /b trial2.exe+trial1.exe trial2.exe

took more than 2 seconds to append 120MB file to 5MB file to get 125MB
Deleted both trial*.exe files.

That proves that when appending the small to the large file, the large file
was not re-copied into itself, but the 2nd file was only added on the end.

HTH. (Hope This Helps.
--Richard

- - -
Special Veteran's Day Remembrance
http://www.avbtab.org/rc/veterans.htm



  #13  
Old November 9th 09, 06:12 PM posted to microsoft.public.windowsxp.newusers
Richard[_12_]
external usenet poster
 
Posts: 429
Default How do you tag one file onto the end of another?

"J. P. Gilliver (John)" wrote in message
...
I know one way to join files: in a command box,

copy /b filea+fileb filec

. However, if filea is huge, this takes a noticeable time, because
the entirety of filea is copied to filec (followed by fileb,
obviously). I know with text files, you can just append things to
another file - e. g.

dir filea

will I think append a directory listing to filea, or

type fileb filea

will append fileb to filea - but only if it's a text file.

Anyone know how to concatenate arbitrary files, without involving a
third file?


In message , Richard
writes:

To append fileB to fileA:

copy /b fileA+fileB fileA

FWIW. --Richard




"J. P. Gilliver (John)" wrote in message
...

Won't that still go through the motions of copying every byte of fileA,
even if it's putting the results back in the same place?


Hi again John,

(Actually, I used such small test files it was too fast to tell.

Here's the output of my 2 tests:
C:\copy /a test1.txt+test2.txt test1.txt
test1.txt
test2.txt
1 file(s) copied.

C:\type test1.txt
This is test1...
This is test2...

C:\copy /a test1.txt+test2.txt+test3.txt test1.txt
test1.txt
test2.txt
test3.txt
1 file(s) copied.

C:\type test1.txt
This is test1...
This is test2...
This is test2...
This is test3...

Note that it says only "1 file(s) copied."

(We need bigger guns...

Made a copy of a 120MB exe file as trial1.exe (took more than 2 seconds)
Made a copy of a 5MB exe file as trial2.exe (took less than a second)
C:\copy /b trial1.exe+trial2.exe trial1.exe

took less than a second to append 5MB to 120MB file to get 125MB
Deleted both trial*.exe files.

Copied 120MB exe file as trial1.exe again
Copied 5MB exe file as trial2.exe again
C:\copy /b trial2.exe+trial1.exe trial2.exe

took more than 2 seconds to append 120MB file to 5MB file to get 125MB
Deleted both trial*.exe files.

That proves that when appending the small to the large file, the large file
was not re-copied into itself, but the 2nd file was only added on the end.

HTH. (Hope This Helps.
--Richard

- - -
Special Veteran's Day Remembrance
http://www.avbtab.org/rc/veterans.htm



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 08:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.