1 (edited by v_pozidis 2015-04-17 13:19:43)

Topic: Current Dir in script

I have create a Button for backup using the CopyTo. How can I make the Restore using the CopyTo, I cannot find the CurrentDir in script.

Re: Current Dir in script

What is it "CopyTo" ?



Example, how to get current directory:

sDir := ExtractFilePath(Application.ExeName);
Dmitry.

Re: Current Dir in script

Hello Dmitry and v_pozidis

Perhaps a confusion with CopyTo from DBImage1 and DBFile1 ?

JB

4 (edited by v_pozidis 2015-04-18 09:17:30)

Re: Current Dir in script

Sorry, I meant CopyFile

So waht I want to do is:
I have create a button with the following script
  CopyFile('sqlite.db', 'Backup\sqlite.db');

And I need to create a Button to Restore it Back to the current path, and not to the Backup directory.

Re: Current Dir in script

v_pozidis
You can't it do it, because when your project is running, database file (sqlite.db) is busy, you can't overwrite this file.

Dmitry.

Re: Current Dir in script

Bonjour, on peut le sauvegarder mais pour le restaurer il faut que la base soit fermé et puis faire un copier-coller.

Destiny