Open /P not finding file
Dave_S
I'm having difficulty using the OPEN command with the /P=pathname flag.
It seems that when I use the /P flag and try to use a partial path as the fileNameStr it fails to find the file desired.
Since I can't upload the file hierarchy, here is a general description of the behavior I see:
The file I want to access is located at "Drive_Name:Top_Folder:Folder1:File1.fits"
I create a new path as:
NewPath Path0 "Drive_Name:Top_Folder:"
Then I create a variable to hold the file reference number:
Variable refnum
I can successfully open the file using the command
Open refnum /R as "Drive_Name:Top_Folder:Folder1:File1.fits"
When I try to use the symbolic path and the partial path as:
Open refnum /R/P=Path0 refnum as "Folder1:File1.fits"
IGOR responds with a "Select file" dialog, where the base folder displayed is the same as Top_Folder.
I've successfully opened a file directly in that Top_Folder using the /P option:
Open refnum /R/P=Path0 refnum as "File2.fits"
What am I doing wrong?
FYI, am using IGOR 6.32A on a MacBook Pro.
Thanks for your help!
Dave
Open refnum /R/P=Path0 refnum as ":Folder1:File1.fits"
August 30, 2013 at 01:53 pm - Permalink
Was thrown off by having a semicolon at the end of the symbolic path, AND at the beginning of the partial path.
I'd thought that maybe IGOR just concatenates the strings. But perhaps IGOR sets the base path to the symbolic path, and then needs a ":" at the beginning of the partial path to realize it is a relative path...
In any case, thank you for saving me some typing!
August 31, 2013 at 11:21 am - Permalink