How do I get a VBScript to read the wscript.echo output? - TechRepublic
Question
September 20, 2007 at 01:38 PM
husweety

How do I get a VBScript to read the wscript.echo output?

by husweety . Updated 17 years, 1 month ago

How do I get a VBScript to read the message box’s output after, first searching my computer for that output and second creating a new folder named after that output?

I am trying to create a VBScript that displays the current month/year, searches my computer for that month/year folder and if that folder doesnt already exist creates a new folder labeled after the current month/year displayed, here is what I have so far:

today = Date
Wscript.Echo “Month/Year: ” & Month(today)& “/” & Year(today)

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
If objFSO.FolderExists(“K:\ESInbox\backup\(& Month(today)& “/” & Year(today))”) Then
Wscript.Echo “Folder exists.”
Else
Wscript.Echo “Folder does not exist.”
End If

This discussion is locked

All Comments