DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   Opening 20,000 notepad files and appending to one document (http://www.daniweb.com/forums/thread77732.html)

mariocatch May 8th, 2007 11:44 am
Opening 20,000 notepad files and appending to one document
 
Hey all:

I've been trying to figure out how I would go about doing the following task.

Basically, I have a folder with about 20,000 notepad files. My goal is to have one big word document, and append the contents of each notepad file to the word document. Each notepad file only has about 1 line of text (10-15 words).

I'm not looking for any code on how to do this, just loooking for a pseudo explanation on an approach i could take to tackle this.
Thanks :)

jbennet May 8th, 2007 12:39 pm
Re: Opening 20,000 notepad files and appending to one document
 
i know that in C# you can use the streamreader function to read text files (part of .net)

please do not post the same thread in two forums by the way

http://www.daniweb.com/techtalkforums/thread77732.html
http://www.daniweb.com/techtalkforums/thread77733.html

vijayan121 May 8th, 2007 12:49 pm
Re: Opening 20,000 notepad files and appending to one document
 
get to the command line terminal, cd to the directory and type
copy /A *.txt all.txt
you will get one big text file. i'm not sure about microsoft (or any other) word, but it should be possible to convert a text file to a word processing document.


All times are GMT -4. The time now is 5:19 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC