Wie ich eine Datei mit "kill" lösche, weiß ich ja, aber geht das auch mit einem ganzen Ordner?
Gruß
F.
Wie ich eine Datei mit "kill" lösche, weiß ich ja, aber geht das auch mit einem ganzen Ordner?
Gruß
F.
hab im Archiv ne Lösung gefunden:
https://www.herber.de/forum/archiv/40to44/t43348.htm
Viel Spaß,
Andreas
Gruß
F.
Public Enum FO_Functions
FO_MOVE = &H1
FO_COPY = &H2
FO_DELETE = &H3
FO_RENAME = &H4
End Enum
Dim fileop As SHFILEOPSTRUCT
' Kill own SRM directory
With fileop
.hwnd = 0
.wFunc = FO_DELETE
.pFrom = strTempPath & vbNullChar & vbNullChar
.pTo = ""
.lpszProgressTitle = "Please wait, deleting temp files..."
.fFlags = FOF_SIMPLEPROGRESS Or FOF_NOCONFIRMATION
End With
lRet = SHFileOP(fileop)
If lRet <> 0 Then ' Operation failed
MsgBox Err.LastDllError 'Show the error returned from the API.
Else
If fileop.fAnyOperationsAborted <> 0 Then
MsgBox "Remove operation Failed"
End If
End If