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