2

1) I know if you type %TEMP% into run, it will open that folder. But what does % mean/do?

2) Also, when I'm at work and I type in \\computername\c$ into windows explorer , it will go to the specified computers C:\ . I am unsure what $ means in this situation.

Sorry if this is the wrong place.

1
  • 2
    %Temp% is a system variable. C$ is simply file system variable
    – Ramhound
    Feb 7, 2014 at 3:01

2 Answers 2

3

To expand slightly on Ramhound's explanation:

%TEMP% is a system variable, also called environment variable or envvar, and it can have any content that you set on it. To check the 'currently' set variables, open a command prompt, and type set and it will show the variables that are currently in use, and what they expand to, if you use them with the %VARIABLE%.

Some generic examples:

PUBLIC=X:\Users\Public
SystemDrive=X:
SystemRoot=X:\WINDOWS
ProgramFiles=X:\Program Files

These system variables are useful for programmers who need to install their software to certain locations. Rather than trying to install to C:\ (which as above example does not exist), they can simply invoke Install to %ProgramFiles% which will automatically pick the correct path and install at the correct location.

The C$ refers to a shared folder that is set by Windows as a default share. To check for other 'default' share that Windows have --> Computer Management --> Shared Folders. And also, any share folder with $ at the end are hidden share and does not appear on share folder listing.

So for example you have some shared folders (in \\computername):

myShare
myhiddenShare$

Then if someone (or you from other machine) open Windows Explorer and open \\computername it will shows that \\computername\myShare is shown on the list while myhiddenShare$ is not there.

You can still access myhiddenShare$ if you know the exact path. So if you enter \\computername\myhiddenShare$ then you will see the content of the share, it will simply not visible under folder/share listing.

Hope this helps.

0
2

The % directories are Environment Variables. i.e. they are already defined in the OS.
You can learn more about them here.
You can view your PCs Environment Variables like this in Windows 7

  • Right Click My Computer
  • select Properties
  • Choose Advanced System Settings
  • goto Advanced tab and click on Environment Variables Button.
    System Properties
    It will show you list of User & System Variables in your system.

Not quite sure about the c$ but I hope it helps you. :)

2
  • Very good. One way to see them.
    – Aaron
    Feb 7, 2014 at 12:23
  • 2
    If it helps: C$ isn't a variable at all. This isn't BASIC/COMAL. It's just a name with a marker character that makes it "special".
    – JdeBP
    Feb 7, 2014 at 13:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .