G
Guest
Hi
I use this code:
Set fso3 = CreateObject("Scripting.FileSystemObject")
Set folderobj = fso3.GetFolder("c:\" & tt & tal & kur1)
For Each fldr In folderobj.subFolders
For Each file In fldr.Files
myattr = file.Attributes
If myattr = 33 Then
ind = MsgBox("Filen " & file.name & " er skrivebeskyttet skal den slettes?
", vbOKCancel)
If ind = vbOK Then
fso3.deletefile file, True
End If
Else
fso3.deletefile file
End If
Next file
fldr.Delete force:=True
Next fldr
well its working but if i have a folder and in this have anew folder with a
file read only i dont get to the file?
Regards alvin
I use this code:
Set fso3 = CreateObject("Scripting.FileSystemObject")
Set folderobj = fso3.GetFolder("c:\" & tt & tal & kur1)
For Each fldr In folderobj.subFolders
For Each file In fldr.Files
myattr = file.Attributes
If myattr = 33 Then
ind = MsgBox("Filen " & file.name & " er skrivebeskyttet skal den slettes?
", vbOKCancel)
If ind = vbOK Then
fso3.deletefile file, True
End If
Else
fso3.deletefile file
End If
Next file
fldr.Delete force:=True
Next fldr
well its working but if i have a folder and in this have anew folder with a
file read only i dont get to the file?
Regards alvin