[Gambas-user] Rename a file in filesystem
Paolo Fagni
paolo.fagni at ...626...
Tue Jan 22 23:39:50 CET 2008
Hello,
I'm trying to simply rename a sqlite database file from "namedb" to "name.db"
. I have to do this because it seems like I cannot create directly "name.db",
The following code
tmpDB = "name.db"
dbConnection.Host = tmpPath
dbConnection.Type = "sqlite3"
dbConnection.Open()
IF NOT dbConnection.Databases.Exist(tmpDB) THEN
dbConnection.Databases.Add(tmpDB)
ENDIF
Doesn't work. The "." in "name.db" seems to be the problem. Could that be
possible? Anyway, if I can't create a "xxx.yyy" sqlite file for some reason,
I would like to know how to simpy rename a file without edit it. I tried the
hFile.Save() method but it creates a new empy file. Should I manually copy
the content of the old file in a new one and then remove the old one? Thank
you.
--
Paolo Fagni
More information about the User
mailing list