2

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)
studiohack
  • 13,490
dotancohen
  • 11,460
  • 1
    As pointed out in comments to answers, this duplicates two existing questions: this and this. – JdeBP Oct 28 '11 at 15:12
  • 1
    Windows also supports the pushd and popd commands, though with much less flexibility than, say, their bash versions. – Keith Thompson Oct 29 '11 at 07:20
  • 1
    @JdeBP what you called "this and this" , the two links are the same, should just read "this". – barlop Nov 07 '11 at 13:26
  • No, barlop. Please apply some nous for once. A correct statement is that the second hyperlink, clearly a copy and paste error on my part, should be this, as given below in the comments if you'd only thought to look. – JdeBP Nov 07 '11 at 13:34
  • @JdeBP You know you've written this this this and this so many times, in so many places, for this question, that it's difficult to see whether and when you're linking to a "this" that you've already linked to. I will clarify by putting them in one comment. and with no hovering required. http://superuser.com/questions/129969/navigate-to-previous-directory-in-windows-command-prompt http://superuser.com/questions/332871/ (journeyman also mentioned the 129969 one). – barlop Nov 16 '11 at 16:03

2 Answers2

2
1.  
C:\blah>pushd a
C:\blah\a>popd
C:\blah>


2. 
cd %userprofile%

3. 
C:\>doskey gocq=cd c:\cq
C:\>gocq <ENTER>
C:\cq>
barlop
  • 23,849
0

cd .. to go one level up

cd \ to go to the root level of the drive

cd %UserProfile% to go to the equivilent of /home - its c:/users/username in windows 7

Journeyman Geek
  • 129,178