Only get files and not sub-directories with Files In Directory( )Is there a simple way to use Files In Directory( ) to only get files and not sub-directories in a specified directory.
I guess one approach would be to use the recursive(1) option, and then filter out from the list the strings that have a "/" in them, but seems there aught to be a simpler way.
Automation and ScriptingRe: Only get files and not sub-directories with Files In Directory( )If I remember correctly I have just gotten the list with Files In Directory and then used Filter Each to get the list of files. You could also use command line or multiple file import (Directory Tree: Explore Space Used by Folders )
Re: Only get files and not sub-directories with Files In Directory( )Hmm, that's weird,
Names Default To Here( 1 );
Files In Directory( "$EXAMPLES" );
on a Mac I only get the file names, and no paths.
Re: Only get files and not sub-directories with Files In Directory( )On win there are several non-file types of objects that could show up if you are poking around in odd places. Using the isFile and isDirectory functions helps.