Windows 8 and 8.1 Forums


Command prompt quesstion

  1. #1


    Posts : 20
    windowws 8.1

    Command prompt quesstion


    What does command symbol % mean?

    For example I know that CD means Current Directory or Change Directory.

    What does %CD% mean?

    Don Cole

      My System SpecsSystem Spec

  2. #2



    Trying to Sith things out
    Bamberg Germany
    Posts : 2,288
    Windows 10 Pro 64 bit


    From Stackoverflow:
    1. The percent sign is used in batch files to represent command line parameters: %1, %2, ...
    2. Two percent signs with any characters in between them are interpreted as a variable:
      echo %myvar%
    3. Two percent signs without anything in between (in a batch file) are treated like a single percent sign in a command (not a batch file): %%f
    What is the difference between % and %% in a cmd file? - Stack Overflow
      My System SpecsSystem Spec

  3. #3


    Posts : 47
    Windows 8.1 Pro/Server 2012 R2 Datacenter


    Quote Originally Posted by doncole View Post
    What does command symbol % mean?

    For example I know that CD means Current Directory or Change Directory.

    What does %CD% mean?

    Don Cole
    You can see what %CD% means by typing "echo %cd%" in the console. The output you get will be the current directory name. So it means the current directory.
      My System SpecsSystem Spec

  4. #4


    On my Win 10 Pro system, %cd% appears to hold the last cd (change directory) target you entered.
      My System SpecsSystem Spec

Command prompt quesstion
Related Threads
Command prompt flashed once in General Support
Hello, While typing up an assignment, I just barely noticed that command prompt opened and then closed for a fraction of a second. I am extremely cautious with the files I download, and instantly performed a scan with malwarebytes. It detected nothing, so I performed a second scan with...
Solved Sfc /scannow command prompt in Performance & Maintenance
I ran the sfc /scannow command prompt on my Windows 8.1 desktop. It said it could fix all of the problems. So, I restarted it. It said the corrupted files were in C/Windows/Logs/CBS/CBS.log. I couldn't get it to paste the files on this forum. Also, command prompt gave me a not that said...
Solved Command Prompt Woes in General Support
Hello! So, I seem to be having a problem when command prompt needs to run anything as an admin. This happens whenever it feels it needs to do so, like when setting a program to run as admin myself, or running an installer, like the setup for firefox (I'm in chrome right now, but I happen to...
Command Prompt help in General Support
The average monitor can display 25 lines of text in full screen mode. When you list a directory containing more than 25 files, some of the filenames disappear off the top of the screen before you have a chance to read them. What do you add to the DIR command to always prevent this?
Solved elevated command prompt...huh? in General Support
how do I open an elevated command prompt?
Command Prompt crashes in General Support
Hi After upgrading from Windows 7 to Windows 8 everything seems to works fine except when I want to run command line applications from 3rd party programs. When this is happening the Windows 8 command prompt just stop working. I have to use many programs based on command prompt for web developing...
Command Prompt shortcut in General Support
Hello, I don't know if anyone has suggested this before or not. Sorry to be redundant if they have. See Picture attached.
Eight Forums Android App Eight Forums IOS App Follow us on Facebook