Hi All,
I need to have a vba code to check if the folder named work_<datestamp> exists in C:/Temp and create one if it doesnt exist.
If Exist, delete all the contents of it.
Can anyone help me with this?
Thank you.
Hi All,
I need to have a vba code to check if the folder named work_<datestamp> exists in C:/Temp and create one if it doesnt exist.
If Exist, delete all the contents of it.
Can anyone help me with this?
Thank you.
No problem.. i did it myself.. Thanks..
![]()
sWorkDir = sDefault_Dir & "\" & "work_" & currentDate If Dir(sWorkDir, vbDirectory) = "" Then MkDir sWorkDir Else 'Delete files fso.deletefile sWorkDir & "\*.*", True 'Delete subfolders fso.deletefolder sWorkDir & "\*.*", True End If
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks