How best to re-write vbs script code wscript

I need to try to get this to work in a vs 2012 project, I have the following segments.  I'm not sure I understand what wscript does, here are the example pieces.

objArgs = wscript.Arguments
        If (objArgs.Count = 2) Then
            DirName = CStr(objArgs(0))
            ReadingDate = CDate(objArgs(1))
        ElseIf (objArgs.Count = 1) Then
... code here

    FileSys = wscript.CreateObject("Scripting.FileSystemObject")

Open in new window

Who is Participating?
DontmilkthisConnect With a Mentor Commented:
If you're asking what the 'wscript' object is within vbscript, you can read a little about it on MSDN -

It is basically a global variable that's used interact with the scripting engine.

The most useful things wscript can do is:
Provide access to the arguments/parameters used when calling the script
Output to the console
initialise various system level object types

I don't know of a related object in the functionality is split throughout the .Net libray.

for the two uses in your snippet.
arguments can be obtained from

Open in new window

the file system object (Scripting.FileSystemObject) functionality can be found within the System.IO namespace.
What is your question?
UnderSevenAuthor Commented:
Yep.  This is what I was looking for. Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.