Topic: Create folder by script

Hello Dmitri

How to create by script (or behind  button click) a new folder depending on the content of a Editbox ?
I explain :

A table to manage a discotheque.
A  DBImage for covers (a folder Covers has been previously created).
With DBImage, we use Type = LinkFile and  CopyTo = \Covers.

An EditBox to enter name of the performer

The purpose of this script is to create a new folder (inside folder \Covers) with the name of the performer entered
(i.e. In EditBox, we enter YOUNG Neil, so a new folder would be created in this form \Covers\Young).

I try this :

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    If Form1.EditBox1.Text = 'YOUNG' then
       Form1.DBImage1.dbCopyTo := '\Covers\Young';
end; }

But nothing happens. Folder \Young is not created.
What's wrong with it.

Thanks for your help.

JB

Re: Create folder by script

Hello,


Please attach your project.

Dmitry.

Re: Create folder by script

Hello Dmitry

Thanks for your answer.

On beginning of July, I sent you a zip file of a biblio project with the same problem (sent to drivesoft)
Well I see mail adress was  drive.soft.mail@googlemail.com. IS it good adress ?
It seemed to me there was term 'support' in previous mail adress.

Can you tell me if you received zip file sent this date ?
If not, I can send it again, please tell what is the good adress

Thanks Dmitry

JB

Re: Create folder by script

I remember that I sent to you the fixed version, but I can not find that letter.


Just try this:

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
       Form1.DBImage1.dbCopyTo := '\Covers\'+Form1.EditBox1.Text;
end;
Dmitry.

Re: Create folder by script

Hello Dmitry

Thanks for your celerity.
Your aswer is the good answer.
I've tried it and all works fine.

As usual, answer was under my eyes.
Please, if you find fixed version, would you sent it again to my mail adress ?
Thanks again

JB

Re: Create folder by script

Sorry, using desktop e-mail client which don't store attachments.

Dmitry.

Re: Create folder by script

Dmithy

Well your previous answer is enough for me.

By the way is there possibility to change font color of a column in a TableGrid
(I.e write in red color a colomn where names of a plant are in latin) ?

Thanks

JB

Re: Create folder by script

jean.brezhonek
You can change only background color of header, example:
http://myvisualdatabase.com/forum/misc. … download=1

Dmitry.