From fef001266afaf40acee56a49c8748ae56920791d Mon Sep 17 00:00:00 2001 From: Lukas Ziegler Date: Mon, 8 Mar 2021 13:06:04 +0100 Subject: [PATCH] change src folder and data argument --- compose.vbs | 4 +++- decompose.vbs | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/compose.vbs b/compose.vbs index 80b54e1..8375d3b 100644 --- a/compose.vbs +++ b/compose.vbs @@ -50,7 +50,9 @@ Function importModulesTxt(ACCDBFilename, sImportpath) ' if no path was given as argument, use a relative directory If (sImportpath = "") Then - sImportpath = myPath & "\Source\" + sImportpath = myPath & "\src\" + else + sImportpath = myPath & sImportpath End If ' check for existing file and ask to overwrite with the stub diff --git a/decompose.vbs b/decompose.vbs index 7c1ba2f..7eef707 100644 --- a/decompose.vbs +++ b/decompose.vbs @@ -13,7 +13,7 @@ Const acQuery = 1 Const acExportTable = 0 ' BEGIN CODE -Dim fso, relDoc, ACCDBFilename, sExportpath +Dim fso, relDoc, ACCDBFilename, sExportpath, sData Set fso = CreateObject("Scripting.FileSystemObject") Set relDoc = CreateObject("Microsoft.XMLDOM") @@ -29,6 +29,9 @@ Else sExportpath = Wscript.Arguments(1) End If +sData = Wscript.Arguments(2) + +Wscript.Echo "Export Data " & sData exportModulesTxt ACCDBFilename, sExportpath @@ -46,7 +49,9 @@ Function exportModulesTxt(ACCDBFilename, sExportpath) 'if no path was given as argument, use a relative directory If (sExportpath = "") Then - sExportpath = myPath & "\Source" + sExportpath = myPath & "\src" + Else + sExportpath = myPath & sExportpath End If On Error Resume Next fso.DeleteFolder (sExportpath) @@ -62,7 +67,7 @@ Function exportModulesTxt(ACCDBFilename, sExportpath) Else oApplication.OpenCurrentDatabase ACCDBFilename End If - oApplication.Visible = False + oApplication.Visible = True ' Wscript.Echo "exporting..." Dim myObj @@ -90,7 +95,11 @@ Function exportModulesTxt(ACCDBFilename, sExportpath) For Each myObj In oApplication.CurrentDb.TableDefs If Not Left(myObj.Name, 4) = "MSys" Then 'Wscript.Echo "Exporting TABLE " & myObj.Name - oApplication.ExportXml acExportTable, myObj.Name, sExportpath & "\" & myObj.Name & ".table.txt" + if sData = 1 then + oApplication.ExportXml acExportTable, myObj.Name, sExportpath & "\" & myObj.Name & ".table.txt" + else + oApplication.ExportXml acExportTable, myObj.Name, ,sExportpath & "\" & myObj.Name & ".table.txt" + end if 'put the file path as a second parameter if you want to export the table data as well, instead of ommiting it and passing it into a third parameter for structure only End If Next