My application accesses a sqlLite database and I'd like to give the user a chance to make a copy of the database they are connected to and then to reconnect to that cloned database. This is all to be done in the default directory. I have tried 'revCopyFile fileA, fileB' but the result shows Execution Error. There is a resulting new file but it has nothing in it. I have also tried 'put URL fileA into URL fileB' with no luck. As I read the Dictionary comments there is an old one about requiring an absolute path that just brought up a second question. How is that determined?
Any help on either revCopyFile or absolute path will be appreciated.
Thanks,
Larry
revCopyFile
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: revCopyFile
Hi Larry,
You probably already know this but:
Will put the file in the same folder as the stack. You can use any of the specialFoderPath as well.
Simon
You probably already know this but:
Code: Select all
put the effective filename of this stack into tPath
set the itemDelimiter to slash
delete last item of tPath
put fileA into url("binfile:" & tPAth & "/fileB")
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: revCopyFile
Thanks Simon,
That took care of the path part but the file that was created was empty rather than a clone. I guess I'll just have to tell my user to go to the Finder, copy and paste with the desired name.
Larry
That took care of the path part but the file that was created was empty rather than a clone. I guess I'll just have to tell my user to go to the Finder, copy and paste with the desired name.
Larry
Re: revCopyFile
Hi Larry,
I've copied files lots of times without trouble.
Maybe I didn't use enough words:
Does that help?
For larger files:
Simon
I've copied files lots of times without trouble.
Maybe I didn't use enough words:
Code: Select all
put the effective filename of this stack into tPath
set the itemDelimiter to slash
delete last item of tPath
put url "http://www.mysite.com/database.sql"into url("binfile:" & tPAth & "/database.sql")
For larger files:
Code: Select all
put the effective filename of this stack into tPath
set the itemDelimiter to slash
delete last item of tPath
libURLDownloadToFile "http://www.mysite.com/database.sql", tPAth & "/database.sql"
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!