Choosefile extension (OpenInsight 16-Bit Specific)
At 16 JUL 2002 05:20:49AM Richard Channer wrote:
Hi all,
I am writing a routine to export data from a table, in csv, htm, rtf or htm formats.
What I would like to do, is call choosefile to get a filename, presenting the available file extensions in param. However, using this method, if the user selects a filetype, and then enters a filename without an extension, I cannot determine which tyoe of file they have selected. Is this possible?
Regards,
Richard
At 16 JUL 2002 11:04AM b cameron wrote:
Richard,
If using choose file and setting
Opt=HTML (*.htm)/*.htm/ Text (*.txt)/*.txt/All Files (*.*)/*.*/"
for the utility CHOOSEFILE, if the user selects one of the file types from the windows open dialog when they start typing in the file name it should seek starting with that file name and the ext. they choose (unless using All). Upon returning to OI you could FIELD(FNAME,".",2) and check the ext. Is that your question?
At 16 JUL 2002 11:52AM Rich Channer wrote:
Not quite - I am using it to save a file, not open one. So the user may for example select the .htm file type, but enter only 'TEST' as a filename.
choosefile then only returns "\path\TEST" and does not append the selected extension
![]()
Richard
At 16 JUL 2002 03:43PM b cameron wrote:
Ahh, gotcha. Sorry don't know anything about that one.
Maybe look in the MS Windows SDK.
At 18 JUL 2002 08:43AM Oystein Reigem wrote:
Richard,
In the 16-bit version of my latest app I use Sprezzatura's Utility32 for file handling. And I don't have the problem you describe.
(The main reason I started using Sprezzatura's Utility32 was I needed long file names. I might discontinue the 16-bit version and concentrate on a 32-bit version, but Sprezzatura's Utility32 has worked reliably so I will continue using the product in the 32-bit version of the app.)
- Oystein -