VBS - Script to Create Folder With Date/Time in Home Area
Hi guys. Been staring at this all morning but not sure why it's not working.
It'll go on to become an all-powerful profile cleanup script, but I can't even get it to make the folder at the moment. Here is the phail so far:
It's just NOT creating that folder!!! Aaagghhh!!!
'Declare the variables:
Dim dtmValue, strDate, strTime
'Create the file system object for creating folders:
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Get current time in to a variable:
dtmValue = Now()
'set variable for that folder name:
strDate = "W:\profile_cleanup" & Month(dtmValue) & "_" & Day(dtmValue) & "_" & Year(dtmValue) & " " & Hour(dtmValue) & ":" & Minute(dtmValue) & ":" & Second(dtmValue)
'tell people what the score is:
Wscript.Echo "Hi - your profile data has been removed from your profile to your W: drive. It is now in a folder I've made called " & strDate
'Create the folders using objFSO
Anyone have any ideas?