Chuck,
Tm shows yhou how to make a directory in one statement, but if it does
exist, any files in it will remain. This may be what you want, but you
explanation suggests that you might wan t to clear it, so if this is the
case, this will do as you describe
Sub CLR()
Dim sFolder
Dim fso
sFolder = "C:\NewDir"
If FolderExists(sFolder) Then
Set fso = CreateObject("Scripting.FileSystemObject")
fso.deletefolder sFolder, force:=True
Set fso = Nothing
End If
MkDir sFolder
End Sub
'-----------------------------------------------------------------
Function FolderExists(Folder) As Boolean
'-----------------------------------------------------------------
Dim sFolder As String
On Error Resume Next
sFolder = Dir(Folder, vbDirectory)
If sFolder <> "" Then
If (GetAttr(sFolder) And vbDirectory) = vbDirectory Then
FolderExists = True
End If
End If
End Function
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)