Opening .dat files
| SailBlue5 | December 1, 2008 - 12:43 | ||
|---|---|---|---|
|
When I use the following command It brings up a dialog that asks me to select a file, which is what I want; however it only shows the *.txt files until I tell it to show *.* files. I either want it to show the *.dat files or all files by default. Is there a way to do that? Michael |
|||

Joined: 2007-03-01
Location: United States
Take a look at the "Open File Dialog File Filters" section in the Command Help entry for the Open operation. I'm using Igor 6.10, but I assume that this section also exists in earlier versions.
In short, you want to use the /T flag or possibly the /F flag, if you are certain that users of your code will be using Igor 6.10 or greater.
Joined: 2007-12-25
Location: Australia
Open /R refTempLog
It brings up a dialog that asks me to select a file, which is what I want; however it only shows the *.txt files until I tell it to show *.* files. I either want it to show the *.dat files or all files by default. Is there a way to do that?
Michael
Use
open/R/T="????" refTempLogto get what you want. If you do actually only ever want .dat files you can use:
open/R/T=".dat" refTempLogand in all cases you can toggle the popup in the open-file dialog that says "Files of type:" from the default "Plain text files (*.txt)" to "All files (*.*)" (or the equivalent in Mactintosh) to select any file.
Patrick.