Hi all,

Can i get the name of the running script from within the script ?

Rikkie

Re: Script name by Steve

Steve
Wed Dec 24 14:17:19 CST 2003

Rikkie wrote:
> Can i get the name of the running script from within the script ?

ScriptName Property
http://msdn.microsoft.com/library/en-us/script56/html/wsproscriptname.asp

Download Windows Script Documentation
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9

--
Steve

There is this difference between happiness and wisdom, that he that thinks
himself the happiest man really is so; but he that thinks himself the wisest is
generally the greatest fool. -Charles Caleb Colton



Re: Script name by McKirahan

McKirahan
Wed Dec 24 14:39:35 CST 2003

"Rikkie" <everslegers@web.de> wrote in message
news:3fe9f164$0$26891$ba620e4c@news.skynet.be...
> Hi all,
>
> Can i get the name of the running script from within the script ?
>
> Rikkie

The following returns:
a ) ScriptName
b) ScriptFullName
c) path to ScriptName extracted from ScriptFullName

Run asis; watch for word-wrap:

Option Explicit
Dim strSFN
strSFN = WScript.ScriptFullName
strSFN = Left(strSFN,InStrRev(strSFN,"\"))
WScript.Echo WScript.ScriptName & vbCrLf & WScript.ScriptFullName & vbCrLf &
strSFN



Re: Script name by Rikkie

Rikkie
Thu Dec 25 03:51:59 CST 2003

Thanks.

"Rikkie" <everslegers@web.de> wrote in message
news:3fe9f164$0$26891$ba620e4c@news.skynet.be...
> Hi all,
>
> Can i get the name of the running script from within the script ?
>
> Rikkie
>
>