DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to load an entire directory into DiAdem

Solved!
Go to solution

I can load my individual .ADF files by calling DataFileLoad but I have about 120 files in three folders in one parent folder. 

Is their a way to search for all these files (perhaps using the datafinder which I configured for .adf files) and then load them all together?

 

Thanks, 

Omar

0 Kudos
Message 1 of 3
(4,457 Views)
Solution
Accepted by topic author Meky
dim result : result = DirListGet("C:\tmp", "*.adf", "filename", "FullFilenamesRecursive")
dim fl : for each fl in result
  DataFileImport fl
Next

or using Datafinder which can be used to with more than file extension to deterermine which files to load.

 

Dim DataFinder : Set DataFinder = Navigator.ConnectDataFinder("My DataFinder")
Dim Query : Set Query = DataFinder.CreateQuery(eAdvancedQuery)
Call Query.Conditions.Add(eSearchFile, "folder", "=", "C:\tmp\*")
Call Query.Conditions.Add(eSearchFile, "fileName", "=", "*.adf")
DataFinder.Search(Query)

Dim File
For each File in DataFinder.Results
  DataFileImport File.Properties("fullpath").Value
Next

 

Message 2 of 3
(4,451 Views)

Thanks, that was really helpful!

0 Kudos
Message 3 of 3
(4,448 Views)