cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

MFI from a selectable location

BenBaecker
Level I

 

Hi, I'm quite new to the JSL world, or to coding in general. I would like to save myself some time-consuming work with a few simple scripts.
As in this case, I would like to automate the MFI. To do this, I copied the script below from the MFI dialog and added the “Pick Directory” command.

My only problem is that the "Select a directory" dialog appears twice every time. After I chose the storage location twice, the rest of the script and the commands following the MFI worked without any problems.

 

Multiple File Import(
 <

 

This post originally written in German and has been translated for your convenience. When you reply, it will also be translated back to German.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User


Re: MFI from a selectable location

It might be enough if you move Pick Directory() outside << Set Folder

Names Default To Here(1);

sel_dir = Pick Directory("Select a directory.", "$Desktop");
Multiple File Import(
	<<Set Folder(sel_dir),
	<<Set Subfolders(0),
	<<Set Name Filter("*.meas9206;"),
	<<Set Name Enable(1),
	<<Set Size Enable(0),
	<<Set Date Enable(0),
	<<Set Add File Name Column(1),
	<<Set Add File Size Column(0),
	<<Set Add File Date Column(0),
	<<Set Import Mode("CSVData"),
	<<Set Charset("Vermutete Codierung"),
	<<Set Stack Mode("Stack Similar"),
	<<Set CSV Has Headers(0),
	<<Set CSV Allow Numeric(1),
	<<Set CSV First Header Line(1),
	<<Set CSV Number Of Header Lines(1),
	<<Set CSV First Data Line(25),
	<<Set CSV EOF Other(";"), 

) << Import Data;
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User


Re: MFI from a selectable location

It might be enough if you move Pick Directory() outside << Set Folder

Names Default To Here(1);

sel_dir = Pick Directory("Select a directory.", "$Desktop");
Multiple File Import(
	<<Set Folder(sel_dir),
	<<Set Subfolders(0),
	<<Set Name Filter("*.meas9206;"),
	<<Set Name Enable(1),
	<<Set Size Enable(0),
	<<Set Date Enable(0),
	<<Set Add File Name Column(1),
	<<Set Add File Size Column(0),
	<<Set Add File Date Column(0),
	<<Set Import Mode("CSVData"),
	<<Set Charset("Vermutete Codierung"),
	<<Set Stack Mode("Stack Similar"),
	<<Set CSV Has Headers(0),
	<<Set CSV Allow Numeric(1),
	<<Set CSV First Header Line(1),
	<<Set CSV Number Of Header Lines(1),
	<<Set CSV First Data Line(25),
	<<Set CSV EOF Other(";"), 

) << Import Data;
-Jarmo
BenBaecker
Level I


Re: MFI from a selectable location

Thanks. i its works for me. I tried some similiar, with "dir" instead of "sel_dir, but that doesent worked well. Maybe i had Synthax Failure.