From: Big D on
How can I get the name of the script I am running?

FOR EXAMPLE,

Lets say I execute DeployAll.vbs and when this script is running I want to
be able to get the name if script and I store in memory.

If I were to Wscript.Echo Filename,
I would expect DeployAll.vbs.

Thanks!



From: McKirahan on
"Big D" <BigDaddy(a)newsgroup.nospam> wrote in message
news:OggWc4zdFHA.3328(a)TK2MSFTNGP09.phx.gbl...
> How can I get the name of the script I am running?
>
> FOR EXAMPLE,
>
> Lets say I execute DeployAll.vbs and when this script is running I want to
> be able to get the name if script and I store in memory.
>
> If I were to Wscript.Echo Filename,
> I would expect DeployAll.vbs.
>
> Thanks!

WScript.Echo Wscript.ScriptName


From: Ato Bisda on
Wscript.FullName

"Big D" <BigDaddy(a)newsgroup.nospam> wrote in message news:OggWc4zdFHA.3328(a)TK2MSFTNGP09.phx.gbl...
> How can I get the name of the script I am running?
>
> FOR EXAMPLE,
>
> Lets say I execute DeployAll.vbs and when this script is running I want to
> be able to get the name if script and I store in memory.
>
> If I were to Wscript.Echo Filename,
> I would expect DeployAll.vbs.
>
> Thanks!
>
>
>


From: Ato Bisda on
Sorry I meant to say Wscript.ScriptFullName

"Big D" <BigDaddy(a)newsgroup.nospam> wrote in message news:OggWc4zdFHA.3328(a)TK2MSFTNGP09.phx.gbl...
> How can I get the name of the script I am running?
>
> FOR EXAMPLE,
>
> Lets say I execute DeployAll.vbs and when this script is running I want to
> be able to get the name if script and I store in memory.
>
> If I were to Wscript.Echo Filename,
> I would expect DeployAll.vbs.
>
> Thanks!
>
>
>


From: Big D on
How can I use the command and drop the path? I just want the script name.

So,
DeployAll.vbs


CODE:
WScript.Echo "current script name =", WScript.ScriptFullName

Output:
current script name = C:\Documents and
Settings\jbrown.LIMITED\Desktop\DeployAll.vbs


"Ato Bisda" <atobisda(a)gmail.com> wrote in message
news:%23GefFM0dFHA.3224(a)TK2MSFTNGP10.phx.gbl...
> Sorry I meant to say Wscript.ScriptFullName
>
> "Big D" <BigDaddy(a)newsgroup.nospam> wrote in message
> news:OggWc4zdFHA.3328(a)TK2MSFTNGP09.phx.gbl...
>> How can I get the name of the script I am running?
>>
>> FOR EXAMPLE,
>>
>> Lets say I execute DeployAll.vbs and when this script is running I want
>> to
>> be able to get the name if script and I store in memory.
>>
>> If I were to Wscript.Echo Filename,
>> I would expect DeployAll.vbs.
>>
>> Thanks!
>>
>>
>>
>
>