PC Review


Reply
Thread Tools Rate Thread

The "Copy /b" command on cmd

 
 
Becquer
Guest
Posts: n/a
 
      1st Jun 2008
I can merge two files by typing on the cmd(without the [] and the "") :

"copy /b [file1name] + [file2name] [targetfilename]"

Where [file1name] and [file2name] are the name of the two files I want to
merge and [targetfilename] is the result file where i want they to mergre in.

But, how can I "unmerge" the result file into the original files?

 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      1st Jun 2008

"Becquer" <(E-Mail Removed)> wrote in message
news:8EC4D24C-8F75-4C9C-8A2E-(E-Mail Removed)...
>I can merge two files by typing on the cmd(without the [] and the "") :
>
> "copy /b [file1name] + [file2name] [targetfilename]"
>
> Where [file1name] and [file2name] are the name of the two files I want to
> merge and [targetfilename] is the result file where i want they to mergre
> in.
>
> But, how can I "unmerge" the result file into the original files?
>


The two (or more) files are merged seamlessly. Unless you add
a marker (see below), you cannot unmerge them.

echo ================== > marker.txt
copy /b file1.txt + marker.txt + file2.txt file3.txt


 
Reply With Quote
 
HeyBub
Guest
Posts: n/a
 
      1st Jun 2008
Becquer wrote:
> I can merge two files by typing on the cmd(without the [] and the "")
> :
>
> "copy /b [file1name] + [file2name] [targetfilename]"
>
> Where [file1name] and [file2name] are the name of the two files I
> want to merge and [targetfilename] is the result file where i want
> they to mergre in.
>
> But, how can I "unmerge" the result file into the original files?


Slight correction: the files are not "merged." They are "concatenated."

The "/b" switch implies the files are binary files, NOT text files, that
they should be copied in their entirety rather than the copy process
quitting at the first end-of-file marker.


 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      1st Jun 2008
Hi Becquer,

If I wanted the ability to go back to each separate file, I would make a
copy of each file before concatenating to the target file.

Alan

"Becquer" <(E-Mail Removed)> wrote in message
news:8EC4D24C-8F75-4C9C-8A2E-(E-Mail Removed)...
>I can merge two files by typing on the cmd(without the [] and the "") :
>
> "copy /b [file1name] + [file2name] [targetfilename]"
>
> Where [file1name] and [file2name] are the name of the two files I want to
> merge and [targetfilename] is the result file where i want they to mergre
> in.
>
> But, how can I "unmerge" the result file into the original files?
>



 
Reply With Quote
 
Patrick Keenan
Guest
Posts: n/a
 
      2nd Jun 2008
"Becquer" <(E-Mail Removed)> wrote in message
news:8EC4D24C-8F75-4C9C-8A2E-(E-Mail Removed)...
>I can merge two files by typing on the cmd(without the [] and the "") :
>
> "copy /b [file1name] + [file2name] [targetfilename]"
>
> Where [file1name] and [file2name] are the name of the two files I want to
> merge and [targetfilename] is the result file where i want they to mergre
> in.


As noted, this concatenates, not merges. There can be a difference.

> But, how can I "unmerge" the result file into the original files?


You can't, using these utilities. And the original files still exist.

If you want to split files, use a file split utility. If you want to
reproduce the original sizes, you have to know exactly where the
concatenation occurred and specify that for the split.

HTH
-pk

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command prompt "COPY" command not working in brand new Windows Vis CMD COPY command not working in Vista Windows Vista File Management 7 5th Feb 2008 09:20 PM
"Open command prompt here" and "Copy as path" Moody Marco Windows Vista Performance 10 4th May 2007 05:41 PM
after a ftp put command it just says "200 PORT command successful." and hangs forever. What could be wrong? when i test the ftp server using IE in "passive" mode it works fine. but ftp at command line hangs on "200 PORT comma Daniel Microsoft Windows 2000 Security 6 1st May 2006 02:51 PM
after a ftp put command it just says "200 PORT command successful." and hangs forever. What could be wrong? when i test the ftp server using IE in "passive" mode it works fine. but ftp at command line hangs on "200 PORT comma Daniel Microsoft Windows 2000 Networking 1 29th Apr 2006 02:42 AM
after a ftp put command it just says "200 PORT command successful." and hangs forever. What could be wrong? when i test the ftp server using IE in "passive" mode it works fine. but ftp at command line hangs on "200 PORT comma Daniel Microsoft Windows 2000 1 29th Apr 2006 02:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:13 AM.