consolidating ascii/text files into one

I have a Software package that requires vector data in the form of text / ascii files.  There are many files that cover a small geographical area.  I want to combine these files into one file. Is there any way other than pasteing to get
all the info into one file.  Maybe a software or something? When I say many we are talking hundreds.
dtaAsked:
Who is Participating?
 
twolConnect With a Mentor Commented:
Here is a way you can do it, even if files are very different names, assuming you at least move the files into one directory...

from a dos prompt:

dir *.* > merge.bat

edit merge.bat as follows

make each line say

type {filename}  >> bigfile.txt


where {filename} is the name of each file you want to merge. The >> is a pipe command from dos that directs the output into bigfile.txt. A single > will clear out the file and start from scratch, so, if you want make the first line say

type {filename1} > bigfile.txt


(Your other option is to erase bigfile.txt before you get started each time you build it).
0
 
ozoCommented:
In what operating system?
0
 
celticsCommented:
If these vector files all have the same extensions do the following.
1) Open a DOS Prompt(Commant Prompt)
2) Switch to the directory where the vector files are.
3) Type in the following :
   COPY *.VEC NEW.VEC
Note : Replace VEC with the extension for your vectors.  Also ensure that the file that you are copying to, NEW.VEC in my example, does not exist.
0
 
twolCommented:
After editing the file and saving it, just type

merge.bat

at the command line and hit enter and you'll have your file
0
 
MoondancerCommented:
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed.  Also a question is posted there specific to these changes that apply to the experts here.  Also, I am including the link to our All Topics, since many new ones have recently been added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0
All Courses

From novice to tech pro — start learning today.