PC Review


Reply
Thread Tools Rate Thread

Add file to other file

 
 
Richhall
Guest
Posts: n/a
 
      19th Mar 2008
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
 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      19th Mar 2008

"Richhall" <(E-Mail Removed)> wrote in message
news:e62e2d7f-bea7-475b-9b24-(E-Mail Removed)...
> 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


 
Reply With Quote
 
Bob I
Guest
Posts: n/a
 
      19th Mar 2008


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.

 
Reply With Quote
 
Marty K
Guest
Posts: n/a
 
      19th Mar 2008
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.
 
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
File sort order reversed or wrong in File Open or File Save dialog box NinerSevenTango Windows XP General 1 1st Aug 2009 01:48 PM
coping file from a remote file share - FILE IS NO LONG THERE bogus error message Heith Windows Vista Networking 0 18th Oct 2007 09:58 PM
In file parsing, taking the first few characters of a text file after a readfile or streamreader file read... .Net Sports Microsoft ASP .NET 11 17th Jan 2006 12:44 AM
An Automated process of watching a network file folder, reading a file in it and deleting the file using ASP.NET ? Luis Esteban Valencia Muņoz Microsoft ASP .NET 3 4th Jun 2005 11:56 AM
i received a file that reads powerpoint document file file exten. =?Utf-8?B?Q0NBUk9MQUNFUkVD?= Microsoft Excel Misc 1 4th Dec 2004 05:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:43 PM.