Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

undocumented batch vars

7 views
Skip to first unread message

Thomas Steinbach

unread,
Feb 11, 2009, 2:52:40 PM2/11/09
to
Hello NG,

totday I found a website wich explains the
"internal" environment vars

%~d0 current drive
%~p0 current path
%~dp0 current drive and path of executed batch
%~n0 current batch name without extension

I never heard of this vars before and now I'm
searching an offiical MS documentation of this vars.
Are this vars undocumented?

Does anybody knows an official and an unofficial
documentation of this vars if there are more vars
like this vars?


Thomas

foxidrive

unread,
Feb 11, 2009, 3:51:19 PM2/11/09
to

FOR /?

at the end.

Matthias Tacke

unread,
Feb 11, 2009, 3:58:24 PM2/11/09
to
Thomas Steinbach wrote:
> Hello NG,
>
> totday I found a website wich explains the
> "internal" environment vars
>
> %~d0 current drive
> %~p0 current path
> %~dp0 current drive and path of executed batch
> %~n0 current batch name without extension
>
> I never heard of this vars before and now I'm
> searching an offiical MS documentation of this vars.
> Are this vars undocumented?
>
Hi Thomas,
it is documented, albeit difficult to find ;-)

> Does anybody knows an official and an unofficial
> documentation of this vars if there are more vars
> like this vars?

Yes, %* i.e.

Since the windows help is language dependent here is the german title:
Verwenden von Batchparametern

A way to find this information langugae independent is to use hh.exe in
a aconsole window:
HH ntcmds.chm::/percent.htm

Übersicht über die Eingabeaufforderung
HH ntcmds.chm::/ntcmds_shelloverview.htm
Befehlszeilenreferenz A-Z
HH ntcmds.chm::/ntcmds.htm
Verwenden von Batchdateien
HH ntcmds.chm::/batch.htm
Call
HH ntcmds.chm::/call.htm

Otherwise follow the links in all these references.

BTW Since this is valid for windows versions of the nt range
(NT/W2K/XP/Vista) alt.msdos.batch.nt is the better group to post to.


--
HTH
Matthias

Thomas Steinbach

unread,
Feb 16, 2009, 3:48:20 PM2/16/09
to
Hello Foxidrive and Mathias,

>> totday I found a website wich explains the
>> "internal" environment vars
>>
>> %~d0 current drive
>> %~p0 current path
>> %~dp0 current drive and path of executed batch
>> %~n0 current batch name without extension

> FOR /?
>
> at the end.

Thank you. That's it. I never had read that before ;-)


Thomas

Dutchie

unread,
Feb 16, 2009, 4:38:16 PM2/16/09
to
0 new messages