Search for tables
ortizmario6025…
Forums
Hello,
I'm automating several IDEA scripts. It turns out that for my analyses, I always import two large tables. I've written a separate script to import those two tables. I scheduled the import in Windows to run early in the morning. The question is: How do I get the other scripts to search for the tables in that folder and load them when they run?
Thanks
The idea is that my main…
The idea is that my main script looks for the table in a directory, which I export with another script. If it's there, then the process begins.
That's the idea.
The important thing is to have those tables in a single directory; the other scripts should point to that directory.
Here is some code you can…
Here is some code you can add to your scripts that will check if a file exists and if it does then it will carry out the tests. I am not sure if this is what you are looking for, let me know if it isn't.
Sub Main
Dim fso As Object
Dim sFile As String
Set fso = CreateObject("Scripting.FileSystemObject")
sFile = Client.WorkingDirectory() & "General Ledger-GL - Journal Entries.IMD"
If Not fso.FileExists(sFile) Then
MsgBox "Exit script, file has not been imported"
Exit Sub
End If
'File exists so run tests.
End Sub