Searching and opening files in a multi level directory structure
Dec 19, 2018 6:57 PM(727 views)
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.
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.
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?