|
|
|
|
|
Dicas
|
|
Visual Basic (Arquivos/Diretórios)
|
|
|
Título da Dica: Checando se um arquivo existe com FileSystemObject
|
|
|
|
Postada em 8/10/2003 por ^HEAVY-METAL^
Shows how To use the Microsoft 'Scripting Runtime Library To 'determine If a File Exists.
'This snippet uses the Microsoft 'Scripting Runtime Library, so To 'use it make sure you check 'offf the Microsoft Scripting 'Runtime In Visual Basics References.
'All you need To Do Is pass the 'Function the full path of the file 'you want To check And it will Return 'True If the file exists And False 'If it does not. Function FileExists(ByVal lsFilename As String) As Boolean On Error Resume Next Dim fso As New Scripting.FileSystemObject FileExists = fso.FileExists(lsFilename) Set fso = Nothing End Function
T+,
Manuel
|
|
|
|
|