Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 20-07-2007, 11:02 AM   #1 (permalink)
filth is me
 
forever's Avatar
 
Join Date: Apr 2006
Posts: 297
Unhappy how to append text files to a bigger file?


hello friends. i have a query. i have 16 text files(.txt) and i want to make one big text file with all the files appended into one big file, like if there is l1.txt ...l16.txt, i want one l.txt = l1+l2+..l16, pardon the bad expression, is this possible? please suggest something, thank you
forever is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 20-07-2007, 11:56 AM   #2 (permalink)
Wise Old Crow
 
blueshift's Avatar
 
Join Date: Apr 2005
Location: Inside the Pixel
Posts: 1,227
Default Re: how to append text files to a bigger file?

Yes you can..using Command windows.

Goto Run>cmd. Then go to the location where your txt files are located using cd command. Then give the command:
copy /y 1.txt+2.txt+3.txt final.txt
final.txt is the name of final txt file.
__________________
http://twitter.com/blueshift155
blueshift is offline  
Old 20-07-2007, 12:34 PM   #3 (permalink)
Beware of the innocent
 
ilugd's Avatar
 
Join Date: Dec 2005
Posts: 1,024
Default Re: how to append text files to a bigger file?

first of all, back up your files somewhere else, then try
(I assume you are using windows-type this in the command line)
copy 1.txt + 2.txt + .... + 16.txt 1.txt

oops.. I guess I didn't refresh to check if the post was updated.
__________________
Life is too short. Have fun.

Last edited by ilugd; 20-07-2007 at 12:34 PM. Reason: Automerged Doublepost
ilugd is offline  
Old 20-07-2007, 12:53 PM   #4 (permalink)
Human Spambot
 
Join Date: Nov 2004
Location: Madurai
Posts: 2,349
Default Re: how to append text files to a bigger file?

Actually, if you can use wildcards * and ? too, so you can do "copy *.txt new.txt".

Arun
sakumar79 is offline  
Old 20-07-2007, 01:24 PM   #5 (permalink)
filth is me
 
forever's Avatar
 
Join Date: Apr 2006
Posts: 297
Default Re: how to append text files to a bigger file?

hey thanks for the quick replies guys, thank you :
forever is offline  
Old 09-09-2007, 11:13 AM   #6 (permalink)
Right Off the Assembly Line
 
Join Date: Sep 2007
Posts: 2
Default Re: how to append text files to a bigger file?

Quote:
Originally Posted by sakumar79
Actually, if you can use wildcards * and ? too, so you can do "copy *.txt new.txt".
This worked for me. But is there a way to append some text between each text file? If TEXT1.TXT has the following as its content:

cars
bikes
scooters

and TEXT2.TXT has:

planes
trains
automobiles

can it be made to output:

cars
bikes
scooters
------------------------------
planes
trains
automobiles

Otherwise, it just crams each file together and makes it hard to differentiate between each one.

The reason I ask is because I've got a couple hundred text files I want to merge and doing it by hand is going to be quite time-consuming.
Styler0001 is offline  
Old 09-09-2007, 09:51 PM   #7 (permalink)
Beware of the innocent
 
ilugd's Avatar
 
Join Date: Dec 2005
Posts: 1,024
Default Re: how to append text files to a bigger file?

create a new file called spacer.txt and do a copy like this
copy 1.txt + spacer.txt + 2.txt full.txt
__________________
Life is too short. Have fun.
ilugd is offline  
Old 10-09-2007, 12:51 AM   #8 (permalink)
Right Off the Assembly Line
 
Join Date: Sep 2007
Posts: 2
Default Re: how to append text files to a bigger file?

That's not really feasible. As I said in the last sentence, I've got a couple HUNDRED text files I need to merge.
Styler0001 is offline  
Old 10-09-2007, 01:15 AM   #9 (permalink)
I am Optimus Prime
 
navjotjsingh's Avatar
 
Join Date: Feb 2005
Location: Delhi, India
Posts: 1,919
Default Re: how to append text files to a bigger file?

You just need a single spacer.txt buddy? Howcome the procedure above mentioned by ilugd time consuming?
navjotjsingh is offline  
Old 10-09-2007, 02:32 AM   #10 (permalink)
Beware of the innocent
 
ilugd's Avatar
 
Join Date: Dec 2005
Posts: 1,024
Default Re: how to append text files to a bigger file?

you will need to do batch scripting. something like shell scripting.
__________________
Life is too short. Have fun.

Last edited by ilugd; 10-09-2007 at 02:33 AM. Reason: Automerged Doublepost
ilugd is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add text to video file...how? linardni Software Q&A 13 25-09-2006 09:14 PM
make a big file as big as u want... bigger than digit fan the.kaushik Tutorials 26 16-08-2006 11:48 AM
converting .pdf to text file abhijitnandedkar Software Q&A 2 29-12-2005 11:42 PM
text files on vcd gambit QnA (read only) 3 08-07-2005 01:57 PM
append (NODE **q, int num) .... HELP iinfi QnA (read only) 5 07-01-2005 07:58 PM

 
Latest Threads
- by ico
- by Piyush
- by icebags
- by clinton
- by Charan

Advertisement




All times are GMT +5.5. The time now is 12:08 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2