Creating Folders by Date

Home Forums Scripting General Scripting Creating Folders by Date

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    usits
    Member
    #121059

    I have this script that I found on MS site:
    strMonth = Month(Date)

    If Len(strMonth) = 1 Then
    strMonth = “0” & strMonth
    End If

    strDay = Day(Date)

    If Len(strDay) = 1 Then
    strDay = “0” & strDay
    End If

    strYear = Year(Date)

    strFolderName = “C:ScriptsTammy_” & strMonth & “-” & strDay & “-” & strYear

    Set objFSO = CreateObject(“Scripting.FileSystemObject”)
    Set objFolder = objFSO.CreateFolder(strFolderName)

    How can I use or modify this script so that it creates a folder with yesterday’s date?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.