I need a script that will export data from a MySql database into flat files and into a folder structure. The script would need to strip out all non-allowable characters (for Windows) in the file name.
The solution could run inside MySQL or outside, but must run on a Windows Vista machine.
The database is composed of several tables. There are article tables for each category (for instance, "Legal"), and then a table listing all of the sub-categories (Legal:Living-Will) that are in all of the categories tables.
The current database structure looks like this, with sample data in the parentheses () and any columns to be excluded marked "do not use":
-Author (do not use)
-Title (Free Last Will And Testament Packages)
-keywords (do not use)
-Category (Legal:Living-Will) (Legal)
The text file structure would need to look like:
--Living Will (folder)
----Free Last Will And Testament [url removed, login to view]
However, some of the articles do not have a sub-category, and instead fall under the larger category (Legal).
There are 12 category tables that would need to be exported. I can provide a full list once the job is accepted.
The total database is too large to export, so I have included a sample of the data.
The following are included as non-acceptable Windows filename characters:
< >[ ] Brackets
= Equal sign
+ Plus sign
\ / Slashes
, . : ; Comma, Period, Colon, Semicolon
Will need developer to provide any support needed to get the script running if special requirements (install of anything) are needed.