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.
...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.
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.
Bottom line :ed for
The question still stands : What is the "=C:" environment variable us
?
Regards,
Rudy Wieser
You can post the screen shot in: de.alt.dateien.misc
and in the text-only group just give the information
that you posted it there.
Windows contains secrets normally kept hidden under the floorboards.
Following on what Frank said, it turns out Windows creates "drive-specific current directory" environment variables which look funnily like this....
=C:
Each one stores the current working directory (cwd) for that drive.
Try this:
C:\> cd \Windows
C:\Windows> D:
D:\> cd \Games
D:\Games> C:
C:\Windows>
Notice how switching back to C: returns you to C:\Windows automatically? That's because Windows stored it in that =X: stuff.
They're maintained internally by the OS,
not by the shell
so you can't read them (echo %=C:%) or see them with set or even write to them.
Try these proof-of-concept examples:
C:\> cd \Windows
C:\Windows> echo %=C:%
C:\Windows
Switch drives:
C:\Windows> D:
D:\> echo %=C:%
C:\Windows
It stays the same until you change directories on C:.
Current working directory, to be precise.
Nope, thats something else.
No, it is,
but - as usual - you snipped the/your context.
"The %=C:% environment variable in Windows is a hidden, special
system-wide variable that stores the current working directory
for the C: drive.
See? "current working directory", like I said.
Its certainly not system-wide.
It probably was in the "legacy mechanism". Another part you
snipped.
See a pattern there!? :-(
Here are the key details about %=C:%:[snip]
That explains nothing about its usage.
It's usage is rather obvious from the snipped (Sigh!) example.
The others had no problems understanding it's usage, See for
example, but not only, Kenny's response.
The question still stands : What is the "=C:" environment variable used
for ?
Sigh!
To know the current working directory on the C: drive, when the
active working directory is on another drive.
As it's an environment variable, it can be used in other commands,
etc..
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 15 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 234:21:29 |
| Calls: | 207 |
| Files: | 21,502 |
| Messages: | 83,204 |