hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to append 2 files

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Command tasks and commandline
View previous topic :: View next topic  
Author Message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Wed Jan 03, 2007 1:36 pm    Post subject: how to append 2 files Reply with quote

User support request:

Is there any feature in Automize that will merge two files together: file 1 appends file 2.
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Wed Jan 03, 2007 1:38 pm    Post subject: Reply with quote

If you are using windows, you can use a DOS copy command in the command task. There should be something similar for unix.

example commandline: cmd.exe /c copy c:\test\test1.txt+c:\test\test2.txt c:\test\appended.txt

To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).

here is the help documentation in DOS prompt using : copy /?

Copies one or more files to another location.

COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B][+ source [/A | /B] [+ ...]] [destination [/A | /B]]

source Specifies the file or files to be copied.

/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a non-8dot3 name.
/Y Suppresses prompting to confirm you want to overwrite anexisting destination file.
/-Y Causes prompting to confirm you want to overwrite an existing destination file.
/Z Copies networked files in restartable mode.
The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line. Default is to prompt on overwrites unless COPY command is being executed from within a batch script.

To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Command tasks and commandline All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group