Oi,

Para verificar se existe:

Delphi syntax:

function DirectoryExists(const Directory: string): Boolean;

Description

Call DirectoryExists to determine whether the directory specified by the
Name parameter exists. If the directory exists, the function returns true.
If the directory does not exist, the function returns false.

If a full path name is entered, DirectoryExists searches for the directory
along the designated path. Otherwise, the Name parameter is interpreted as a
relative path name from the current directory.

The FileCtrl unit (Windows only) also contains a DirectoryExists function.
However, the FileCtrl version is deprecated, and the SysUtils version
preferred, even if the code does not need to be cross-platform.

*********************************************************************************

Para criar:


Delphi syntax:

function CreateDir(const Dir: string): Boolean;

Description

CreateDir creates a new directory. The return value is true if a new
directory was successfully created, or false if an error occurred.

****************************************************************************************************

Em 28/08/06, Sérgio <[EMAIL PROTECTED]> escreveu:
>
> Boa tarde pessoal,
>
> Gostaria de um help de vocês. Como faço para verificar a existencia de uma
> determinada pasta dentro de um diretório e se a mesma nao existir, como faço
> para criá-la via comando delphi mesmo??
>
> Ex: Verificar a existencia da pasta TESTE dentro do diretório C:\TEMP ??
> Se nao existir, cria a pasta la dentro, ficando C:\TEMP\TESTE ??
>
> Ficarei grato àqueles que puderem ajudar..
>
> Obrigado
>
> Sérgio
>
>
>
>
> [As partes desta mensagem que não continham texto foram removidas]
>
> 
>



-- 
Ismair C. Alves
msn: [EMAIL PROTECTED]
Gandhi: "Primeiro eles te ignoram,
depois riem de você, depois resolvem lutar
e então você vence"


[As partes desta mensagem que não continham texto foram removidas]



-- 
<<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>>

<*> Para ver as mensagens antigas, acesse:
    http://br.groups.yahoo.com/group/delphi-br/messages

<*> Para falar com o moderador, envie um e-mail para:
    [EMAIL PROTECTED]
 
Links do Yahoo! Grupos

<*> Para visitar o site do seu grupo na web, acesse:
    http://br.groups.yahoo.com/group/delphi-br/

<*> Para sair deste grupo, envie um e-mail para:
    [EMAIL PROTECTED]

<*> O uso que você faz do Yahoo! Grupos está sujeito aos:
    http://br.yahoo.com/info/utos.html

 


Responder a