Du kan alltid bruge API . Her kommer kode der du kan tilpasse til sletting,
kopiering, flytnig osv.
BG
Option Explicit
Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Boolean
hNameMappings As Long
lpszProgressTitle As String
End Type
Private Const FO_MOVE As Long = &H1
Private Const FO_COPY As Long = &H2
Private Const FO_DELETE As Long = &H3
Private Const FO_RENAME As Long = &H4
Private Const FOF_MULTIDESTFILES As Long = &H1
Private Const FOF_CONFIRMMOUSE As Long = &H2
Private Const FOF_SILENT As Long = &H4
Private Const FOF_RENAMEONCOLLISION As Long = &H8
Private Const FOF_NOCONFIRMATION As Long = &H10
Private Const FOF_WANTMAPPINGHANDLE As Long = &H20
Private Const FOF_CREATEPROGRESSDLG As Long = &H0
Private Const FOF_ALLOWUNDO As Long = &H40
Private Const FOF_FILESONLY As Long = &H80
Private Const FOF_SIMPLEPROGRESS As Long = &H100
Private Const FOF_NOCONFIRMMKDIR As Long = &H200
Private Declare Function apiSHFileOperation Lib "shell32.dll" _
Alias "SHFileOperationA" _
(lpFileOp As SHFILEOPSTRUCT) _
As Long
Function CopyFileAPI(strFrom As String, strTo As String) As Boolean
On Error GoTo Err_CopyFileAPI
Dim tshFileOp As SHFILEOPSTRUCT
Dim lngRet As Long
Dim lngFlags As Long
lngFlags = FOF_FILESONLY Or FOF_NOCONFIRMATION Or FOF_SIMPLEPROGRESS
With tshFileOp
.wFunc = FO_COPY
' .hwnd = Me.hwnd 'Kan krasje systemet
.pFrom = strFrom & vbNullChar
.pTo = strTo & vbNullChar
.fFlags = lngFlags
'.lpszProgressTitle = ???
End With
lngRet = apiSHFileOperation(tshFileOp)
CopyFileAPI = (lngRet = 0)
Exit_CopyFileAPI:
Exit Function
Err_CopyFileAPI:
MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical
Resume Exit_CopyFileAPI
End Function
"Allan R." <ganjadk@icqmail.com> wrote in message
news:9oqrbe$5ds$1@eising.k-net.dk...
> man kan da ikke slette den skjulte mappe _RESTORE .... eller noget... jeg
> lavede et batch til dette, men det virkede ikke...
> fuck nu det.. det skulle kun gøre en gang... og jeg vil ikke slette andre
> filer end *.tmp selvom der er andre filer i TEMP...
>
>