Text files to database.

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
Glenn
Posts: 10
Joined: Wed Jan 23, 2013 8:54 pm

Text files to database.

Post by Glenn »

I would like to convert text files within directories into a database and wondered whether textpipe was the tool for the job.

More info: I have have 35 directories that each contain many, many sub-directories within sub-directories (18300 total). Each sub-directory has a text file in it that lists keyword terms. Is it possible for textpipe to parse these directories and text files and create an importable sql file that will create the database keeping the same structure and naming conventions as the current directory setup?

Grateful for any insight, thanks.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Text files to database.

Post by DataMystic Support »

Sure, you can grab the file contents by adding a

Filters\Add\File Header of

Code: Select all

insert into tablename (field1, field2) values ("
and a
Filters\Add\File Footer of

Code: Select all

", '@fullinputfilename" );
And set the secondary output filename to merge all data to a new file.

Then you'll have one file to process with all the file data + subfolder names.

Then you need to decide if you need to parse out the subfolder names further with an extra step.
Post Reply