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)
5
  • 1
    As pointed out in comments to answers, this duplicates two existing questions: this and this.
    – JdeBP
    Oct 28, 2011 at 15:12
  • 1
    Windows also supports the pushd and popd commands, though with much less flexibility than, say, their bash versions. Oct 29, 2011 at 7:20
  • 1
    @JdeBP what you called "this and this" , the two links are the same, should just read "this".
    – barlop
    Nov 7, 2011 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 7, 2011 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. superuser.com/questions/129969/… superuser.com/questions/332871 (journeyman also mentioned the 129969 one).
    – barlop
    Nov 16, 2011 at 16:03

2 Answers 2

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>
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

5
  • I think by the previous directory they didn't mean to go up, but one step back in the "history", so to say.
    – slhck
    Oct 28, 2011 at 13:24
  • 1
    ahh, that would be covered by this superuser.com/questions/129969/…
    – Journeyman Geek
    Oct 28, 2011 at 13:28
  • And the other cd command is covered by this SuperUser question.
    – JdeBP
    Oct 28, 2011 at 14:28
  • "cd /" really? come on man.. \\\\\\\\\\\\\\\\ You're not helping him by using forward slashes when writing what are blatantly windows directories.
    – barlop
    Nov 7, 2011 at 12:28
  • my bad. fixed. surprised no one caught it ;p
    – Journeyman Geek
    Nov 7, 2011 at 12:30

You must log in to answer this question.

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