cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

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

Recommended Articles