You can execute this script by calling cscript `decompose.vbs <path to file to decompose> <folder to store text files>`. In case you omit the second parameter, it will create 'Source' folder where the database is located. Please note that destination folder will be wiped if it already exists.
with line `oApplication.ExportXML acExportTable, myObj.Name, sExportpath & "\" & myObj.Name & ".table.txt"`
## compose.vbs
Text-file only solution (queries, tables and relationships included)
I have altered the Oliver's pair of scripts so that they export/import relationships, tables and queries in addition to modules, classes, forms and macros. Everything is saved into plaintext files, so there is no database file created to be stored with the text files in version control.
You can execute this script by calling cscript `compose.vbs <path to file which should be created> <folder with text files>`. In case you omit the second parameter, it will look into 'Source' folder where the database should be created.
### Import data from text file
Replace line 14: `const acStructureOnly = 0` with `const acStructureOnly = 1`. This will work only if you have included the data in exported table.
## Things that are not covered
1. I have tested this only with .accdb files, so with anything else there might be some bugs.
2. Setting are not exported, I would recommend creating the Macro that will apply the setting at start of the database.
3. Some unknown queries sometimes get exported that are preceded with '~'. I don't know if they are necessary.
4. MSAccess object names can contain characters that are invalid for filenames - the script will fail when trying to write them. You may normalize all filenames, but then you cannot import them back.