How to use "cd" command in Windows

Page 1 of 2 12 LastLast

  1. Posts : 12
    Ubuntu Linux
       #1

    How to use "cd" command in Windows


    Hi all, I'm a Linux user just starting to get the hang of Windows 7. How can one perform these functions with the Windows cd command:
    1) Go back to the previous directory (cd - in Bash)
    2) Go to the user's home directory (cd ~ in Bash)
    3) Bookmark a directory (not built into bash, but cdargs or DerB can be added)

    Thanks
      My Computer


  2. Posts : 8,398
    ultimate 64 sp1
       #2

    1) to go back a folder try cd.. - ie cd 'dot' 'dot'

    i'm not sure about the other two apart from cd users\[username]

    you may find this link useful for other commands.
      My Computer


  3. Posts : 10,455
    Microsoft Windows 7 Home Premium 64-bit Service Pack 1
       #3

    I don't think it can. If you type help cd you will get the full list of options.
      My Computer


  4. Posts : 997
    Windows 7 Home Premium 64-bit, SP1
       #4

    dotancohen said:
    Hi all, I'm a Linux user just starting to get the hang of Windows 7. How can one perform these functions with the Windows cd command:
    1) Go back to the previous directory (cd - in Bash)
    2) Go to the user's home directory (cd ~ in Bash)
    3) Bookmark a directory (not built into bash, but cdargs or DerB can be added)

    Thanks
    I know absolutely nothing about this subject.
    Found this site. Wonder if it can help any ...
    MS-DOS cd command help
      My Computer


  5. Posts : 12
    Ubuntu Linux
    Thread Starter
       #5

    mickey megabyte said:
    1) to go back a folder try cd.. - ie cd 'dot' 'dot'

    i'm not sure about the other two apart from cd users\[username]

    you may find this link useful for other commands.
    Thanks, but that goes up one directory, not back to my previous directory. The link has some good info, though it's cd page does not address the issue. Thanks.

    I actually expected that this would be a common need, I'm surprised that Windows does not have this and that there are no other Windows admins posting about such an obvious feature.
      My Computer


  6. Posts : 8,398
    ultimate 64 sp1
       #6

    sorry, i misunderstood your question about previous directory. i'm really not much of a command-line guy any more...it's so twentieth century
      My Computer


  7. Posts : 7,878
    Windows 7 Ultimate x64
       #7

    Most Windows admins go to the command line as little as humanly possible. Trust me, unless you came from the DOS days, you probably aren't using the command line for hardly anything.

    As far as I know (A linux admin), there aren't commands like you want in the basic command prompt. Windows has been working on bringing more functionality to the command line through the powershell.

    In my eyes, the command line is one of the best tools for setting anything up and documentation is a breeze. I can give a list of 10 commands and simply have somebody cut and paste them and they are right every single time. Beats the pants of trying to walk everybody through all of the windows, radio button, checkboxes and next, next, next finishes in the Windows server gui.
      My Computer


  8. Posts : 10,455
    Microsoft Windows 7 Home Premium 64-bit Service Pack 1
       #8

    Been doing some investigation.

    You can get to your home directory with cd %homepath%

    If you type set with no arguments it gives you a list of the currently set environment variables. Any of them that are valid paths can be used like this. You can also set your own variables with the set command. Not sure how long the variable persists. You need to look at help set for all the details.
      My Computer


  9. Posts : 12
    Ubuntu Linux
    Thread Starter
       #9

    I came from the Commodore days, spent some time in DOS and Windows though. How can there not be a back command in the Windows CLI? Does the Windows default web browser have a back button?

    Wow, I just checked: the Windows 7 default file manager doesn't have an Up button!
      My Computer


  10. Posts : 12
    Ubuntu Linux
    Thread Starter
       #10

    kado897 said:
    Been doing some investigation.

    You can get to your home directory with cd %homepath%
    Thanks! I've also since discovered the pushd and popd commands, which though don't address my other two concerns might at least help me get by.

    Have a great evening!
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:49.
Find Us