Hi there,
This may be an easy question to answer but what I am trying to do is use JMP to count the number of files contained within a specific directory and return a value of either 0 if none exist or the number of files.
I know that using the Files In Directory function will list the files contained as a list but what I want to do is convert this to a numerical value:
ie:
//set up raw dir
raw_dir = "C:\\My PhotoFilmStrips\";
_files = Files In Directory( raw_dir );
//show files
show(_files);
show( Type(_files), Is Empty(_files), Is Missing(_files), _files==Empty());
If I run the above script i get the following with a file contained within the raw directory:
Type(_files) = "List";
Is Empty(_files) = 0;
Is Missing(_files) = {0};
_files == Empty() = 0;
When the directory is empty I get:
Type(_files) = "Number";
Is Empty(_files) = 0;
Is Missing(_files) = 1;
_files == Empty() = .;
How can I make use of the Is Missing variable - ie if it is 1 then assign the number to a variable like tt=0 and when it the Is Missing variable is 0 then tt=1
Any help would be appreciated
Rgds
Colin