Hello all,How about a screenshot?? Could it be caused by insufficient length of
A couple of days ago I was looking at the envronment variables, and noticed
a variable named "=C:", containing the current path of that drive.
Can anyone tell me what it was/is used for ?
Remarks: Using the command-prompt it doesn't appear in the "set" list, and
it can be read, but not written.
How about a screenshot??
Could it be caused by insufficient length of the PATH string? Or maybe the Command Prompt window's width?
dos batch "=C:" - Google Search https://www.google.com/search?q=dos+batch+%22%3DC%3A%22
Hello all,
A couple of days ago I was looking at the envronment variables, and noticed a variable named "=C:", containing the current path of that drive.
Can anyone tell me what it was/is used for ?
Remarks: Using the command-prompt it doesn't appear in the "set" list, and it can be read, but not written.
Mr. Man-wai Chang,A screen-shot of the Command Prompt window that showed what you just
How about a screenshot??
Of what ?
Could it be caused by insufficient length of the PATH string? Or maybe the >> Command Prompt window's width?
Neither. Its an envronment variables name. As mentioned, using the command-prompt you can read its contents (the current path for that drive), but not set it.
R.Wieser <address@is.invalid> wrote:
Hello all,
A couple of days ago I was looking at the envronment variables, and noticed >> a variable named "=C:", containing the current path of that drive.
Current working directory, to be precise.
Can anyone tell me what it was/is used for ?
Google, which you apparently don't want to use, says (amongst others):
"The %=C:% environment variable in Windows is a hidden, special
system-wide variable that stores the current working directory for the
C: drive.
It is part of a legacy mechanism (dating back to MS-DOS) that allows
the command processor (cmd.exe) to track separate current directories
for every drive letter, rather than having one single global current
directory for the whole system.
Here are the key details about %=C:%:
* Function: It keeps track of where you are in the C: drive if you are
currently working on a different drive (e.g., if you are in D:\Data
but type cd C:\Users, %=C:% will be updated to C:\Users).
* Automatic Management: This variable is managed automatically by
cmd.exe when you use the cd (chdir) command."
Remarks: Using the command-prompt it doesn't appear in the "set" list, and >> it can be read, but not written.
Google confirm that behaviour.
It also gives a comparison with other variables. such ad %CD%
%SystemDrive% and mentions the somwhat obvious:
"If you change drives, other variables like %=D:%, %=E:%, etc., are
created for those respective drives.".
...How about a screenshot??
Of what ?
A screen-shot of the Command Prompt window that showed what you
just said might help.
...How about a screenshot??
Of what ?
A screen-shot of the Command Prompt window that showed what you
just said might help.
What about you typing it in your puters console and see for yourself ?
Just type "echo %=C:%" and see what the result is. No screenshot needed.
Current working directory, to be precise.
Google, which you apparently don't want to use,
says (amongst others):
"The %=C:% environment variable in Windows is a hidden, special
system-wide variable that stores the current working directory
for the C: drive.
that allows the command processor (cmd.exe)
Here are the key details about %=C:%:[snip]
"If you change drives, other variables like %=D:%, %=E:%, etc.,
are created for those respective drives.".
What about you typing it in your puters console and see for yourself ? >>Just type "echo %=C:%" and see what the result is. No screenshot needed.
First, to answer the thread question: My understanding is that this *is*
how processes in DOS/Windows keep track of the current directory for each drive.
2) (Speaking of screenshots) Given that this is Usenet, and Usenet is
(supposed to be) a text-only medium, how would one go about posting a
screenshot, should one desire to do so? Is there any established
protocol?
First, to answer the thread question: My understanding is that this
*is* how processes in DOS/Windows keep track of the current directory
for each drive.
neither does the real underlying (NT) OS in modern Windows
So, the point is that there are "hidden" environment variables for each
drive that has a current directory other than \.
For example, on the machine I just tested this on, every drive
other than C: had its current directory at the root, so the only
env var I could find was the "=C:\foo\bar\whatever".
That said, I am genuinely (non-rhetorically) curious as to how
you discovered this in the first place, given that these variables
are not displayed by the DOS "set" command.
You'd have needed to use some other tool to scan the environment
table. For that reason, a screenshot would actually have been
useful.
Or, you could just tell us how you found it...
Two other notes:...
That other product (tool) does, indeed, have the ability to access
these variables.
2) (Speaking of screenshots) Given that this is Usenet, and Usenet
is (supposed to be) a text-only medium, how would one go about
posting a screenshot, should one desire to do so? Is there any
established protocol?
some more information about "Undocumented Dynamic variables":
https://ss64.com/nt/syntax-variables.html
and especially for the %=C:% :
https://devblogs.microsoft.com/oldnewthing/20100506-00/?p=14133
Frank,
Current working directory, to be precise.
Nope, thats something else.
Google, which you apparently don't want to use,
Some years ago Google stopped wanting to work with my non-javascript browser. Who's choice was that ?
says (amongst others):
"The %=C:% environment variable in Windows is a hidden, special
system-wide variable that stores the current working directory
for the C: drive.
Its certainly not system-wide.
that allows the command processor (cmd.exe)
Ah, just for the command-processor processes. That makes more sense.
Here are the key details about %=C:%:[snip]
That explains nothing about its usage.
"If you change drives, other variables like %=D:%, %=E:%, etc.,
are created for those respective drives.".
In the command-processor process the change is made in (iow: nothing "system wide" about it). Yeah, I noticed.
Bottom line :
The question still stands : What is the "=C:" environment variable used for ?
echo %=C:%C:\home\franks
cd home
As these newsgroups (on news.eternal-september.org) do not allow attachments you would need to upload them to some image-server, and add the link to it
to your post.
Kenny McCormack wrote:
2) (Speaking of screenshots) Given that this is Usenet, and Usenet is
(supposed to be) a text-only medium, how would one go about posting a
screenshot, should one desire to do so? Is there any established
protocol?
But for Kenny's question above, most of us use some form of free image-hosting web site, where the one I use most asks for no login.
Bottom line :
The question still stands : What is the "=C:" environment variable used for ?
Regards,
Rudy Wieser
In article <10m5ujv$h4sl$3@dont-email.me>,
J. P. Gilliver <G6JPG@255soft.uk> wrote:
...
But for Kenny's question above, most of us use some form of free
image-hosting web site, where the one I use most asks for no login.
No worries; I have no desire to post any screenshots here.
I was just amused by the idea of someone requesting a screenshot on Usenet.
As Tim Walz would say, weird!
And, the point is: Usenet *is* a text-only medium, by definition and
decree, even if lots of people have abused it over the years.
--
"There are two things that are important in politics.
The first is money and I can't remember what the second one is."
- Mark Hanna -
qD:\work\SOURCE\2048>
And, the point is: Usenet*is* a text-only medium, by definition and
decree, even if lots of people have abused it over the years.
Or just general file-sharing site. (And, of course,
include in your newsgroup post - or email - the URL of
the uploaded file.)
Note that most such sites (fair enough, they've got to
pay for themselves somehow) surround the image being
shared with ad.s, and/or require you to log in, and so
on.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 59 |
| Nodes: | 6 (1 / 5) |
| Uptime: | 16:03:21 |
| Calls: | 810 |
| Calls today: | 1 |
| Files: | 1,287 |
| D/L today: |
10 files (21,017K bytes) |
| Messages: | 193,341 |