Thomas,
You could do this with a Word Macro. In it's outline it might look something
like this:
Counter=0
Position cursor at the beginning of the file
Loop until end of file
Move cursor down to first delimiter in file
Select text back to start of file
Cut selected text
Start new file
Paste selected text
set filename=filename_counter.doc
Save as filename and close file
Set counter=counter + 1
Loop
You'll have to write some of this VBA code yourself i.e. the looping and
counter parts but much of it you can generate automatically using Word's
Macro Record function. It is a very simple macro. An experienced VBA coder
could knock this out in 15 minutes. If you need to learn some VBA and play
around with the code a little to get it working properly, then it might take
a couple of hours or so.
Alan.
----- Original Message -----
From: "Thomas Koenig" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, June 19, 2003 11:22 AM
Subject: Context Dependent Text File Splitting
Dear all,
when working with QDA-programs it is often useful to store each data source
file (e.g., a newspaper article) in a separate file. Unfortunately the
result files from databases such as LEXIS/NEXIS often contain hundreds of
articles in a single file, which needs to be split up, so that each article
comes in its own file. Rather than doing the splitting manually, it is, of
course, much more efficient to let a program do that. However, the only
Windows program that splits files along custom-defined delimiters that I
found is csplit
(http://www.lboro.ac.uk/research/mmethods/resources/preparation/index.html#s
plit),
which has a somewhat non-intuitive command line interface.
So, I wonder, which (if any) programs you are using to split files based.
Feedback about the intelligibility of my instructions on how to install and
use csplit
(http://www.lboro.ac.uk/research/mmethods/resources/preparation/index.html#w
install)
is also very welcome. And if any MacUsers have experience with Dejal
TextSplitter (http://www.dejal.com/text-utils/), I would be interested in
your opinion, too.
TIA
Cheers,
Thomas
--
thomas koenig
department of social sciences, loughborough university
http://www.lboro.ac.uk/research/mmethods/staff/thomas/index.html
|