cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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