There may be some more efficient way of doing this, but this
should work.  It allows you to open a particular table but
if you already know which one you are using, then you don't
need that dialog.  Instead of "new" you can pass a variable
to it.

Include "mapbasic.def"
Include "Menu.Def"

Declare Sub Main
Declare Sub GetFile

Global s_sourcefile As String
Global s_putpath As String
Global s_filename As String
Global s_newfilename As String
Global s_tabname As String

Sub Main

        call getfile

End Sub

Sub GetFile
        s_sourcefile = FileOpenDlg("","","tab","Open TAB File")
        s_putpath = PathToDirectory$(s_sourcefile)
        s_filename = PathToFileName$(s_sourcefile)
        s_tabname = PathToTableName$(s_sourcefile)
        s_newfilename = s_putpath+"new"+s_filename

        Open Table s_sourcefile Interactive
        Commit Table s_tabname as s_newfilename TYPE NATIVE Charset
"WindowsLatin1"

End Sub



-----Original Message-----
From: Cummings, Mike [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 7:30 PM
To: [EMAIL PROTECTED]
Subject: MI-L Commit table as


This seems so simple but I can't get it to work.  I want to
rename a
selected table and give it a generic new name in the same
path as the
selected table.  I want the tables in the same path but
different names
one is variable the other known.  How do I set the path so
they with end
up together?

------------------------------------------------------------
---------
List hosting provided by Directions Magazine |
www.directionsmag.com |
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
Message number: 7356





---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7374

Reply via email to