Opening .dat files

SailBlue5
Posts: 18
Joined: 2008-11-24
Location: United States

When I use the following command
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


Posts: 497
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.


patg
Posts: 29
Joined: 2007-12-25
Location: Australia

SailBlue5 wrote:
When I use the following command
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="????" refTempLog
to get what you want. If you do actually only ever want .dat files you can use:
open/R/T=".dat" refTempLog
and 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.


Back to top