append to existis file txt

User avatar
sal21
PlatinumLounger
Posts: 4362
Joined: 26 Apr 2010, 17:36

append to existis file txt

Post by sal21 »

I just have c:\mydir\file.txt
I need to append to file.txt a new file1.txt
how to?

Naturally the best code for fasted opertion

User avatar
HansV
Administrator
Posts: 78528
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: append to existis file txt

Post by HansV »

Try

Code: Select all

Shell "cmd/c ""copy c:\mydir\file.txt+c:\mydir\file1.txt"""
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4362
Joined: 26 Apr 2010, 17:36

Re: append to existis file txt

Post by sal21 »

HansV wrote:Try

Code: Select all

Shell "cmd/c ""copy c:\mydir\file.txt+c:\mydir\file1.txt"""
In vb6 code? if yws how to chech when the copy is finished?
Last edited by sal21 on 07 Feb 2012, 11:06, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78528
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: append to existis file txt

Post by HansV »

Yes - it calls a command processor from VB6.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4362
Joined: 26 Apr 2010, 17:36

Re: append to existis file txt

Post by sal21 »

HansV wrote:Yes - it calls a command processor from VB6.
how to chech when the copy append is finished?

User avatar
HansV
Administrator
Posts: 78528
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: append to existis file txt

Post by HansV »

You could check the last modified date of the file.
Best wishes,
Hans