How to Import All CSV Files Within a Folder Into DIAdem Programmatically?

Updated Jan 21, 2026

Environment

Software

  • DIAdem

This example will show you how to import all CSV files within a folder into DIAdem using VBScript. After VBScript execution completed, all the CSV files will be loaded into DIAdem Data Portal.

  1. Open DIAdem software and select SCRIPT.
  2. Go to File the tab and select New VBS.
  3. Write the scripts as shown in the picture below, and make sure the folder path and the file type are correct.
2022-08-19_17h48_01.png

The script used in the image above is as follows:
Option Explicit
dim result : result = DirListGet("C:\Users\AE\Desktop\Naim\CSVExample", "*.csv", "filename", "FullFilenamesRecursive")
dim fl : for each fl in result
  DataFileImport fl
Next
  1. Then, press Run Script to execute the script.

Here is the list of CSV files:
2022-08-19_17h50_26.png

This is the result after the script finish execution, all the CSV files will be loaded into the DIAdem Data Portal.
2022-08-19_17h48_57.png