Jump to content

Add file to other file


Recommended Posts

Guest Richhall
Posted

Hi

 

I have a file filea.txt that gets created on workstations. I have a

cmd I want to run that will copy this file to a file (log.txt) on

another drive but add into that file not replace. So similar to a >>

when writing to a file. filea is then deleted on the c:\ of the pc.

Can you tell me how I can add into a file please and not replace it?

 

i.e copy c:\filea.txt j:\log.txt but not replace add into.

 

Cheers

 

Rich

  • Replies 4
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

Re: Add file to other file

 

 

"Richhall" <rje.hall@yahoo.co.uk> wrote in message

news:e62e2d7f-bea7-475b-9b24-39e1a6afae3c@c19g2000prf.googlegroups.com...

> Hi

>

> I have a file filea.txt that gets created on workstations. I have a

> cmd I want to run that will copy this file to a file (log.txt) on

> another drive but add into that file not replace. So similar to a >>

> when writing to a file. filea is then deleted on the c:\ of the pc.

> Can you tell me how I can add into a file please and not replace it?

>

> i.e copy c:\filea.txt j:\log.txt but not replace add into.

>

> Cheers

>

> Rich

 

Try this:

type c:\filea.txt >> j:\log.txt

del c:\filea.txt

Posted

Re: Add file to other file

 

Copy and paste.

-------

*Report back, please*

[When responding to posts, please include the post(s) you are replying to so

that others may learn and benefit from the issue]

 

[How to ask a question]

http://support.microsoft.com/kb/555375

 

"Richhall" <rje.hall@yahoo.co.uk> wrote in message

news:e62e2d7f-bea7-475b-9b24-39e1a6afae3c@c19g2000prf.googlegroups.com...

> Hi

>

> I have a file filea.txt that gets created on workstations. I have a

> cmd I want to run that will copy this file to a file (log.txt) on

> another drive but add into that file not replace. So similar to a >>

> when writing to a file. filea is then deleted on the c:\ of the pc.

> Can you tell me how I can add into a file please and not replace it?

>

> i.e copy c:\filea.txt j:\log.txt but not replace add into.

>

> Cheers

>

> Rich

Guest Bob I
Posted

Re: Add file to other file

 

 

 

Richhall wrote:

> Hi

>

> I have a file filea.txt that gets created on workstations. I have a

> cmd I want to run that will copy this file to a file (log.txt) on

> another drive but add into that file not replace. So similar to a >>

> when writing to a file. filea is then deleted on the c:\ of the pc.

> Can you tell me how I can add into a file please and not replace it?

>

> i.e copy c:\filea.txt j:\log.txt but not replace add into.

>

> Cheers

>

> Rich

 

To see how to do this, at the command prompt issue

 

COPY /?

 

It provides an explaination of appending files.

Guest Marty K
Posted

Re: Add file to other file

 

Richhall wrote:

> Hi

>

> I have a file filea.txt that gets created on workstations. I have a

> cmd I want to run that will copy this file to a file (log.txt) on

> another drive but add into that file not replace. So similar to a >>

> when writing to a file. filea is then deleted on the c:\ of the pc.

> Can you tell me how I can add into a file please and not replace it?

>

> i.e copy c:\filea.txt j:\log.txt but not replace add into.

>

> Cheers

>

> Rich

use the dos copy command with the + qualifier for the file to add to

the first file.

At the DOS prompt enter: help copy to see the format and usage.


×
×
  • Create New...