cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
hogi
Level XII

get files in directory

Is there a JSL function to get the names of files in a directory (files, no subdirectories, no files in subdirectories).

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: get files in directory

Use Filter Each() to filter the result from Files In Directory()

Names Default To Here(1);
file_in_dir = Filter Each({filename}, Files In Directory("$HOME"),
	!IsMissing(Regex(filename, "^.+\..+$")) // some pattern here
);

You could also use Multiple File Import but it is a bit more complicated Directory Tree: Explore Space Used by Folders 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: get files in directory

Use Filter Each() to filter the result from Files In Directory()

Names Default To Here(1);
file_in_dir = Filter Each({filename}, Files In Directory("$HOME"),
	!IsMissing(Regex(filename, "^.+\..+$")) // some pattern here
);

You could also use Multiple File Import but it is a bit more complicated Directory Tree: Explore Space Used by Folders 

-Jarmo