Topic: About LikFile and CopyTo

Hello Dmitry

I have a question about duo LinkFile and CopyTo.

Let's say we have a base about books with a field Picture to illustrate the cover of books entered.
For that (and to reduce the size of sqlite.db), we used to play with the couple LinkFile and CopyTo.
In property CopyTo, we give a name for the folder which will store pictures (i.e. \Covers).

I used to prepare all covers in a folder apart from wich I take pictures.
That works fine !

Currently, MVD copies literally the picture from this folder apart towards folder Covers present in the application.
By the way, MVD takes only name of the file.

Would it be possible to change the property CopyTo in order to MVD could integrate  full path of the selected image file ?

For example, I many books for one author (i.e Christie/Cards on Table, The third Girl ....).
Currently, as MVD works, I have to add the author's name before title of the book (i.e Christie_Third Girl).
And I would like MVD creates in folder Covers full path (i.e. Covers\Christie\cards on table and Covers\Coben\Six years ...) and so on.

Do you think such an evolution is possible ?

Thanks for your answer

J B

Re: About LikFile and CopyTo

Hello,


Yes, it's possible, you can change value CopyTo by script using event OnClick of button for save:

Form1.DBFile1.dbCopyTo := 'new value';
Dmitry.

Re: About LikFile and CopyTo

Thanks Dmitry

It doesn't work as I would.

All works fine when I  stand directly at the object inspector (I use a DBImage1).:

I write from property  (DBImage1) CopyTo : \Covers\COBEN and picture goes right in folders \Covers\COBEN.

But how from a script ?

I put this script  behind event OnClick from Save Button.

If Form1.ComboBox1.Text = 'COBEN'  then
       Form1.DBImage1.dbCopyTo := '\Covers\COBEN';

Nothing occurs.
Picture goes right in folder Covers and nothing in folder \COBEN. (Before I'v manually created folder Coben in folder Covers (\Covers\COBEN).

I have about 3.000 books to seize. I do not see myself changed directly in the Object Inspector for each
author who has several books.
This does not make sense. I thought so successful this action via a script that would reflect the new author to return.

Maybe my script is poorly written. Maybe I'm wrong.

What do you think about my probleme ?

Thanks for you help

JB

Re: About LikFile and CopyTo

jean.brezhonek
Please, send me your project to support@drive-software.com
I'll check it.


Thanks.

Dmitry.