BookmarkSubscribe
Choose Language Hide Translation Bar
dmeakin
New Contributor

Searching and opening files in a multi level directory structure

I am extracting a name from a table and want to use that to fine a file associated with that name in a multi level file structure. two to three directories deep. Also the file name is the name extractred from the table plus a possible suffix. Example Name:= N123456 File Name:= N123456 T2.xxx

 

Does anyone know how to call windows search DLL to extract possible files from the direcory structure, select one and pass the name back to a JMP script to open the file.

0 Kudos
2 REPLIES 2
ian_jmp
Staff

Re: Searching and opening files in a multi level directory structure

You probably don't need to use a DLL. Try 'Help > Scripting Index' and search for 'Files In Directory()'. Sounds like you also need the 'recursive' option.

0 Kudos
dmeakin
New Contributor

Re: Searching and opening files in a multi level directory structure

Actually I know I do. I am very familiar with the fill access routines in JMP and they will not work in this case at least not with any kind of manageable efficiency.

To wit.

I have  a table of several hundred ID numbers. These ID numbers also correspond to an image file Some JPG some TIFF that are stored in a 5 level file structure with multipul other file types. I could each time I select a ID number I select the run the script, read in the entire file structure, over 10K files and parse the list for the particular file I need. Trial run took 10 to 20 seconds to load the file structure. Doing that each time I run the script is nuts.

I want to call the window API withi the ID and wild cards and do a search then select the desired file and pass it back to JMP to process the file by calling child process.

 

Do you knonw the API necessary to do the file search and the argument structure?

0 Kudos