Kill all files in Folder, If folder exists
You need to check for the folder not the file...
If fs.folderExists(DestPath) = False Then
'If Dest folder does not exist, create it.
MkDir DestPath
Else
'Delete all files in folder (containing a dot in the file name)
Kill DestPath & "*.*"
End If
--
Jim Cone
Portland, Oregon USA
"u473"
wrote in message
The task : Copy all "Cost Summary" Sheets values from all WB's in
Folder A to Folder B..
If Folder B does not exists, create it and copy there, Works fine. No
problem there.
If Folder B exists, kill all files there before copying. But it does
not enter the Kill statement
behaving like Folder B does not exist, and I do not see anything wrong
with path name spelling.
-snip-
|