How to verificate if a folder exist?

I have create a simple button that select all te images in a folder and then copy them to another folder called imagenes

here is the code of the button

select NONE
select all *.(jpg|jpeg|gif|png)
Copy MOVE to "C:\Archivos de programa\NetMeeting\Help\DOWN\imagenes" WHENEXISTS=rename

sometimes I move that folder to a pendrive, and the button give error if I dont create the folder again.

I whan to now hot can I verificate in the button if that folder exists, and in case it dont exist then create it. can somebody help me with this, thansk

I do not think I quite understand what you want, but you could perhaps attempt to create the folder before you do the copying. If the folder already exists, the command does nothing.

CreateFolder "C:\Archivos de programa\NetMeeting\Help\DOWN\imagenes\" select NONE select all *.(jpg|jpeg|gif|png) Copy MOVE to "C:\Archivos de programa\NetMeeting\Help\DOWN\imagenes\" WHENEXISTS=rename

[quote="JohnZeman"]I do not think I quite understand what you want, but you could perhaps attempt to create the folder before you do the copying. If the folder already exists, the command does nothing.

CreateFolder "C:\Archivos de programa\NetMeeting\Help\DOWN\imagenes" select NONE select all *.(jpg|jpeg|gif|png) Copy MOVE to "C:\Archivos de programa\NetMeeting\Help\DOWN\imagenes" WHENEXISTS=rename[/quote]

I try this, but, if give me a error because it try to copy the folder "imagenes", inside of it self, its wired, because I`m using the select none command, to deselect anything.

Instead of

Select NONE Select ALL *.(jpg|jpeg|gif|png)

try

Select *.(jpg|jpeg|gif|png) DESELECTNOMATCH

Actually, you can do the entire command in a single line:

Copy MOVE *.(jpg|jpeg|gif|png) TO="C:\Archivos de programa\NetMeeting\Help\DOWN" CREATEFOLDER="Imagenes" WHENEXISTS=rename

(That should all be on one line, in case it's wrapped due to a narrow browser window.)

[quote="nudel"]Actually, you can do the entire command in a single line:

Copy MOVE *.(jpg|jpeg|gif|png) TO="C:\Archivos de programa\NetMeeting\Help\DOWN" CREATEFOLDER="Imagenes" WHENEXISTS=rename

(That should all be on one line, in case it's wrapped due to a narrow browser window.)[/quote]

WOW, this works very well, thanks fou you help!.