Programmatically handling of the "Missing Files/Folder" dialog

I'm in the process of mass processing a large number of PXPs.

In some of them there is a path used and a notebook opened which is not present on the PC anymore. That the notebook was still open on save was a bug which is solved already since ages. But of course we have old data.

The offending parts of the recreation macro are

NewPath MIES ":::Program Files:MIES:"
// ...
OpenNotebook/N=UserConfigNB/R/W=(5.25,44.75,705,500)/V=0/P=MIES "UserConfig.txt"

Is there a way to programmatically choose "Skip this Path"/"Skip this File"? I'm loading the experiments with

Execute/P/Q LOADFILE ...

Or can I execute some code before the experiment recreation macro is called and fake the path and file?

 

The only thing I can think of to avoid the dialog is to create a file or folder where it is expected.

If you don't know this a priori then I can not think of a way to avoid the dialog.

 

I have a similar problem: thousands of pxp files that have been created with code stored in various people's computers, with other user name and other Igor versions. Then, if someone else re-opens the file on another computer, we get the "missing folder" error, asking for ~(someone):Documents:Wavemetrics:Igor Pro (6, 7, 8, 9) User Files:Igor Procedures:

Now, with Igor 9, it's double the pain because we have to click twice to cancel this pesky error message.

The solution suggested above is impractical, since there are too many computers with different users.

Is there any way to make these error messages optional ?


Quote:
asking for ~(someone):Documents:Wavemetrics:Igor Pro (6, 7, 8, 9) User Files:Igor Procedures:

If Igor is asking for a folder it is because the experiment contains a symbolic path point pointing to that folder and there were one or more items (procedure files, notebooks, wave files) used by the experiment in that folder at the time the experiment was saved.

When you open such an item, Igor creates a symbolic path for the folder if one does not already exist. When you save the experiment, Igor creates a NewPath command in the experiment recreation procedures if the referenced folders contains one or more items used by the experiment. During experiment recreation, it is this command that displays the missing folder dialog.

(This does not include files opened automatically because they are in "Igor Procedures" or opened in User Procedures and opened by #include. Igor does not create symbolic paths in those cases.)

If the folder contains no such items (i.e., you opened a notebook and then killed it), Igor creates a NewPath/Z command in the experiment recreation procedures. If the folder is missing, the /Z flag tells Igor to ignore the issue so it does not display the missing folder dialog.

So in your case, "someone" must have been other than the current user and the current user opened a file in someone's Igor Procedures folder (not the current Igor Procedures folder). This is an unusual use pattern. Perhaps there is another explanation but I can't think of it.

If Igor simply skipped missing folders, you would get follow on errors when the experiment tried to load the items referenced through that symbolic path.

I have not been able to come up with a good solution for these issues.

Quote:
Now, with Igor 9, it's double the pain because we have to click twice to cancel this pesky error message.

The second dialog asks "Do you want to skip loading all waves from this folder?" This was my attempt to lessen the pain when the missing folder contained a lot of wave files. Previously you would be asked to skip each wave file. But I can see how this is annoying when the folder contains no waves. At this point in the loading process, we don't know what the folder might contain.
 

Hello,

Just to confirm the pain in handling >1000 files that all ask to confirm that I no longer need to access ***:Wavemetrics:Igor Pro 7 User Files... This path was pointing at code that created the files, which now resides in *** Igor Pro 9 User files***.

I created a fake (empty) /Users/uid-something/Documents/WaveMetrics/Igor Pro 7 User Files/Igor Procedures, but still it won't work because the (absolute) path saved in the file was created with another sessions. And there are as many session names (ie absolute path definitions) as people in the lab.

It could be nice to plan for a "relative" path to external files?

In any case, being able to disable this warning would be great.

I'm trying to understand what your situation is but not getting there...

Just to confirm the pain in handling >1000 files that all ask to confirm that I no longer need to access ***:Wavemetrics:Igor Pro 7 User Files... This path was pointing at code that created the files, which now resides in *** Igor Pro 9 User files***.

What kind of files (procedure, notebook, wave) were residing in "Igor Pro 7 User Files"?

And what kind of files were created that now reside in "Igor Pro 9 User Files"?

I created a fake (empty) /Users/uid-something/Documents/WaveMetrics/Igor Pro 7 User Files/Igor Procedures, but still it won't work because the (absolute) path saved in the file was created with another sessions. And there are as many session names (ie absolute path definitions) as people in the lab.

Igor users relative paths if the target file (procedure, notebook, wave) is on the same volume as the experiment file. If it is on a different volume, it has to use full paths. The screenshot you attached shows the error as "The specified volume cannot be found" so I think the target folder was on a different volume from the experiment file.

In any case, being able to disable this warning would be great.

By this you are referring to the screenshot which shows the Missing Folder dialog. This comes from a NewPath command written to the recreation procedures in the experiment file. If the target of the symbolic path contains no referenced external files, Igor writes a NewPath/Z command to the recreation procedures with the /Z meaning "skip if the target folder cannot be found". If you get the Missing Folder dialog, it means that a symbolic path needed to reference external files is missing, so if the Missing Folder dialog were skipped, you would get a prompt for each external file referenced using the symbolic path.

What happens when you click Skip This Path? Do you get additional dialogs asking to locate other files?

The screen shot shows that the missing folder is "Igor Procedures". Procedure files in "Igor Procedures" are automatically loaded when Igor launches and left open until Igor quits (or you manually close the procedure file). Such "global" procedure files are not explicitly referenced by experiment recreation procedures unless you explicitly open them which you should have not need to do.

All that is to say that I don't understand why you have a symbolic path pointing to "Igor Procedures" at all.

Also I don't understand why simply skipping the Missing Folder dialog would help because Igor would still need to find the referenced files.

the (absolute) path saved in the file was created with another sessions. And there are as many session names (ie absolute path definitions) as people in the lab.

This makes me think that perhaps you have users manually loading procedure files from an "Igor Procedures" folder that is not the "Igor Procedures" folder of the current user.

For background information on "Igor Procedures" and similar folders, execute:

DisplayHelpTopic "Special Folders"