choose file with prompt

Hi,

I’m having a problem with the choose file with prompt command. I want it to display only files with extension .cfg. Here is the code:

set fileLocation to choose file with prompt "Choose your output file." of type {"cfg"} without invisibles

Now, when I compile it, it doesn’t work. I can’t select any files at all. What do I have to do, to make it only be able for the user to select the file with .cfg extension?

Thanks,
dr4cula

Hi,

type is the file type, not the name extension
Get the file type of a .cfg file with

display dialog file type of (info for (choose file)) as string

Thanks!