Hi Kevin,
If the Andrew solution does'nt work you can use the PathToTableName$(strFile) function
that allows you to check the table name, and PathToDirectory$(strFile)
function that allows you to check the directory (see the mapbasic help)
'''''---------------code--------------------
include "mapbasic.def"
Declare Sub Main
Sub Main
Dim strFile As String
Dim origTableName As String
Dim newFileName As String
strFile = FileOpenDlg("","","TAB","Open TAble")
Open Table strFile
origTableName = PathToTableName$(strFile)
newTableName = origTableName + "_trk"
Commit Table origTableName As PathToDirectory$(strFile) + newTableName +".tab"
End Sub
''''---------------end code--------------------
Hope this helps!
Kind regards,
__________________________________________________
Sophie Coub�s / [EMAIL PROTECTED]
GIS Consultant
KOREM
GEObroadcasting Technologies
__________________________________________________
680, Charest East Blvd., Suite 120
Quebec (Quebec)
G1K 3J4
Tel.: (418) 647-1555
Fax: (418) 647-1666
1 888 440-1MAP
www.korem.com
__________________________________________________
* MapInfo Canadian Partner of the Year - 2001
* Best New MapInfo Partner 2000 - North America
__________________________________________________
-----Message d'origine-----
De : Canfield, Andrew [mailto:[EMAIL PROTECTED]]
Envoy� : Tuesday, October 15, 2002 2:08 PM
� : 'Kevin Slover'; Directionsmag
Objet : RE: MI-L FileOpenDlg Question
You could do it like this
'''''---------------code--------------------
include "mapbasic.def"
Declare Sub Main
Sub Main
Dim strFile As String
Dim origTableName As String
Dim newFileName As String
strFile = FileOpenDlg("","","TAB","Open TAble")
Open Table strFile
origTableName = TableInfo(0,TAB_INFO_NAME)
Commit Table origTableName As origTableName & "_trk"
End Sub
''''---------------end code--------------------
-----Original Message-----
From: Kevin Slover [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 6:07 AM
To: Directionsmag
Subject: MI-L FileOpenDlg Question
I am using the FileOpenDlg to open a file, register the file, and then
doing a "Commit As" to save the file under a different name to be able
to manipulate the file. What I am wondering is if there is a way to
save the file as the original file name, plus an extension. Example:
szOpenTable = FileOpenDlg(ProgramDirectory$() + ...
Then, I would like to save the table as szOpenTable_trk. Basically, I
wish to keep the file name, add an extension, and save. And ideas?
--
LTJG Kevin Slover, NOAA
GIS Specialist/Oceanographer
NOAA/TPC/TSB/Storm Surge Unit
11691 SW 17th Street
Miami FL 33165
W (305) 229-4456
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 3580
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 3586
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 3588