Page 1 of 1

Text files to database.

Posted: Sun Mar 06, 2016 4:58 am
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.

Re: Text files to database.

Posted: Thu Mar 10, 2016 11:10 am
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.