cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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