INNOV-AI

Innovation and Research from Réunion Island, France

Back   Home

Parse a directory from remote connection @ CONNECT - Connections @ MentDB Weak

> Start the server
> (or start the server for the first time (embedded mode - H2 Database))
> (or start the server for the first time (remote mode - MySQL 8 Database))
> Open the MentDB Weak Editor

Click on 'CONNECT' tab, open 'Remote file', right click on 'demo_cm_file' and select 'GEN > PARSE DIRECTORY'

MQL INPUT
script create post "demo.file.parse_dir" false 1 
  (param
  ;) 
  "Parse a directory" 
{

	#Load the connection id;
	json load "cm" (cm get "demo_cm_file");
	-> "[localDir]" (json select "cm" /localDir);
	
	json load "files" (file dir_list [localDir]);
	-> "[nb_files]" (json count "files" /);
	for (-> "[i]" 0) (< [i] [nb_files]) (++ "[i]") {
	
		-> "[cur_filename]" (json select "files" (concat "/[" [i] "]"));

		#Here your action;
		log trace [cur_filename];
		
	};
	
} "nothing";
start: 2026-01-17   end: 2026-01-31   v_start: 401   v_end: