Sub Main()
Dim p, o
With Application.FileDialog(msoFileDialogFolderPicker)
.Show
p = .SelectedItems(1)
Set o = CreateObject("Scripting.FileSystemObject")
Call Df(p, o)
End With
End Sub
Sub Df(p, o)
Dim f, d
With o.GetFolder(p)
For Each f In .Files
If Right(f.Name, 1) = "~" Then
f.Delete
End If
Next
For Each d In .SubFolders
Call Df(p + "\" + d.Name, o)
Next
End With
End Sub
matarillo
#7500()
[
Other
]
Rating0/0=0.00
VBA for Excel (2003)。デストローイ。ノーフューチャー。
Sub Main() Dim p, o With Application.FileDialog(msoFileDialogFolderPicker) .Show p = .SelectedItems(1) Set o = CreateObject("Scripting.FileSystemObject") Call Df(p, o) End With End Sub Sub Df(p, o) Dim f, d With o.GetFolder(p) For Each f In .Files If Right(f.Name, 1) = "~" Then f.Delete End If Next For Each d In .SubFolders Call Df(p + "\" + d.Name, o) Next End With End SubRating0/0=0.00-0+
[ reply ]