If Left$(Right$(A2, A4), A3) = "\" Or Left$(Right$(A2, A4), A3) = "/" Then
GetFileFromPath = Right$(A2, A4 - 1)
GoTo end1
End If
Next A3
Next A4
end1:
If err.number > 0 Then
GetFileFromPath = A2
err.Clear
End If
End Function
Public Function DeleteDirectory(ByVal DirtoDelete As Variant) As String
Dim FSO As Variant
'Deletes the Directorys . ' Guys I Havent Any Way Out Using The Filesystem . Filesystem Object Can Cause Catching Due To Some Antivirus Programs Sees The FileSystem Objects
On Error GoTo DeleteDirectory_Error
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.DeleteFolder DirtoDelete, True
On Error GoTo 0 ':(áCheck Error Handling Structure
Exit Function
DeleteDirectory_Error:
DeleteDirectory = "Error: " & err.number & " in procedure DeleteDirectory of Module hjjw"
Log DeleteDirectory
End Function
''
':)Code Fixer V3.0.9 (11/15/2006 12:12:18 PM) 1 + 383 = 384 Lines Thanks Ulli for inspiration and lots of code.