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!

Re: get script name by McKirahan

McKirahan
Wed Jun 22 10:53:09 CDT 2005

"Big D" <BigDaddy@newsgroup.nospam> wrote in message
news:OggWc4zdFHA.3328@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



Re: get script name by Ato

Ato
Wed Jun 22 10:55:49 CDT 2005

Wscript.FullName

"Big D" <BigDaddy@newsgroup.nospam> wrote in message news:OggWc4zdFHA.3328@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!
>
>
>



Re: get script name by Ato

Ato
Wed Jun 22 10:56:55 CDT 2005

Sorry I meant to say Wscript.ScriptFullName

"Big D" <BigDaddy@newsgroup.nospam> wrote in message news:OggWc4zdFHA.3328@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!
>
>
>



Re: get script name by Big

Big
Wed Jun 22 12:00:37 CDT 2005

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@gmail.com> wrote in message
news:%23GefFM0dFHA.3224@TK2MSFTNGP10.phx.gbl...
> Sorry I meant to say Wscript.ScriptFullName
>
> "Big D" <BigDaddy@newsgroup.nospam> wrote in message
> news:OggWc4zdFHA.3328@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!
>>
>>
>>
>
>



Re: get script name by Torgeir

Torgeir
Wed Jun 22 12:01:53 CDT 2005

Big D wrote:

> How can I use the command and drop the path? I just want the
> script name.
>
> So,
> DeployAll.vbs
>
Hi,

Didn't you see the response you got from McKirahan?

WScript.Echo Wscript.ScriptName



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx