заранее спасибо

Private Declare Function SHFileExists Lib "shell32" Alias "#45" (ByVal szPath As String) As Long
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
MsgBox "Does the file exist?" + Str$(SHFileExists("c:\autoexec.bat"))
End Sub
Private Declare Function PathFileExists Lib "shlwapi.dll" Alias "PathFileExistsA" (ByVal pszPath As String) As Long
If PathFileExists(App.Path & "\setup.ini") = False Then Exit Sub
Scuder писал(а):Sedge писал(а):Мы не ищем простых путей?
Да куда уж проще-то??
Private Declare Function PathAddBackslash Lib "shlwapi.dll" Alias "PathAddBackslashA" _
(ByVal pszPath As String) As Long
Private Function AddBackslash(ByVal sPath As String) As String
'
On Error GoTo eRes
'//------------------------------------------------------------------------------------
Dim lRes As Long
Dim sBuffer As String
'//------------------------------------------------------------------------------------
sBuffer = Left$(sPath & String(MAX_PATH, vbNullChar), MAX_PATH)
lRes = PathAddBackslash(sBuffer)
If lRes <> 0 Then
AddBackslash = Left$(sBuffer, InStr(sBuffer, vbNullChar) - 1)
End If
Exit Function
eRes:
MsgBox Err.Description
End Function
If PathFileExists(AddBackslash(App.Path) & "setup.ini") = False Then Exit Sub
Tarik писал(а):2Sedge: Ну крут, крут, ничего не скажешь
Dim fso As New FileSystemObject
If fso.FolderExists("C\...") Then
Сейчас этот форум просматривают: Yandex-бот и гости: 8