How to use "cd" command in Windows

dotancohen

New member
Local time
7:39 AM
Messages
12
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

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

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

you may find this link useful for other commands.
 

My Computer

Computer Manufacturer/Model Number
mickey megabyte 1234
OS
ultimate 64 sp1
CPU
i5 2500K [email protected]
Motherboard
MSI P67A-GD53
Memory
8 gigs GSkill Ripjaws 1600
Graphics Card(s)
amd hd6950
Sound Card
creative x-fi gamer
Monitor(s) Displays
samsung 24"
Screen Resolution
1920x1080
Hard Drives
ocz vertex 2e 60 gig, samsung f3 1tb, buffalo 2tb ext
PSU
antec 550
Case
antec three hundred
Cooling
i'm a cooling fan
Keyboard
saitek eclipse ii
Mouse
logitech g3
Internet Speed
about 4 Mbps
Other Info
i love win7
I don't think it can. If you type help cd you will get the full list of options.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Hewlett-Packard/G62-107SA Notebook
OS
Microsoft Windows 7 Home Premium 64-bit Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz
Motherboard
Hewlett-Packard 1425
Memory
8 GB DDR3
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Builtin
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
250 GB SATA Hard Disk Drive 7200 rpm
2TB Seagate GoFlex USB 2 Drive
1TB Iomega Prestige USB 2 Drive
1.5TB Iomega Prestige USB 2 Drive (Samsung)
2TB WD MyBook Live NAS.
Mouse
Logitech Anywhere MX
Internet Speed
152 Mbs download 10 Mbs upload
Antivirus
Norton 360
Browser
Chrome
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

Computer Manufacturer/Model Number
Acer Aspire 7741Z
OS
Windows 7 Home Premium 64-bit, SP1
CPU
Intel Pentium P6200, Cores 2, 2.13 GHz
Memory
4 GB
Graphics Card(s)
Intel HD
Sound Card
unknown
Monitor(s) Displays
17.3 inches
Screen Resolution
1600 x 900
Hard Drives
640 GB, 5400 PRM
1) to go back a folder try cd.. - ie cd 'dot' 'dot'

i'm not sure about the other two :o 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

OS
Ubuntu Linux
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 :p
 

My Computer

Computer Manufacturer/Model Number
mickey megabyte 1234
OS
ultimate 64 sp1
CPU
i5 2500K [email protected]
Motherboard
MSI P67A-GD53
Memory
8 gigs GSkill Ripjaws 1600
Graphics Card(s)
amd hd6950
Sound Card
creative x-fi gamer
Monitor(s) Displays
samsung 24"
Screen Resolution
1920x1080
Hard Drives
ocz vertex 2e 60 gig, samsung f3 1tb, buffalo 2tb ext
PSU
antec 550
Case
antec three hundred
Cooling
i'm a cooling fan
Keyboard
saitek eclipse ii
Mouse
logitech g3
Internet Speed
about 4 Mbps
Other Info
i love win7
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

Computer Manufacturer/Model Number
Self-Built in July 2009
OS
Windows 7 Ultimate x64
CPU
Intel Q9550 2.83Ghz OC'd to 3.40Ghz
Motherboard
Gigabyte GA-EP45-UD3R rev. 1.1, F12 BIOS
Memory
8GB G.Skill PI DDR2-800, 4-4-4-12 timings
Graphics Card(s)
EVGA 1280MB Nvidia GeForce GTX570
Sound Card
Realtek ALC899A 8 channel onboard audio
Monitor(s) Displays
23" Acer x233H
Screen Resolution
1920x1080
Hard Drives
Intel X25-M 80GB Gen 2 SSD
Western Digital 1TB Caviar Black, 32MB cache. WD1001FALS
PSU
Corsair 620HX modular
Case
Antec P182
Cooling
stock
Keyboard
ABS M1 Mechanical
Mouse
Logitech G9 Laser Mouse
Internet Speed
15/2 cable modem
Other Info
Windows and Linux enthusiast. Logitech G35 Headset.
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

Computer type
Laptop
Computer Manufacturer/Model Number
Hewlett-Packard/G62-107SA Notebook
OS
Microsoft Windows 7 Home Premium 64-bit Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz
Motherboard
Hewlett-Packard 1425
Memory
8 GB DDR3
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Builtin
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
250 GB SATA Hard Disk Drive 7200 rpm
2TB Seagate GoFlex USB 2 Drive
1TB Iomega Prestige USB 2 Drive
1.5TB Iomega Prestige USB 2 Drive (Samsung)
2TB WD MyBook Live NAS.
Mouse
Logitech Anywhere MX
Internet Speed
152 Mbs download 10 Mbs upload
Antivirus
Norton 360
Browser
Chrome
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

OS
Ubuntu Linux
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

OS
Ubuntu Linux
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!

It doesn't need an up button the entries in the address bar are active. You can click them to get to anywhere in the current tree.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Hewlett-Packard/G62-107SA Notebook
OS
Microsoft Windows 7 Home Premium 64-bit Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz
Motherboard
Hewlett-Packard 1425
Memory
8 GB DDR3
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Builtin
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
250 GB SATA Hard Disk Drive 7200 rpm
2TB Seagate GoFlex USB 2 Drive
1TB Iomega Prestige USB 2 Drive
1.5TB Iomega Prestige USB 2 Drive (Samsung)
2TB WD MyBook Live NAS.
Mouse
Logitech Anywhere MX
Internet Speed
152 Mbs download 10 Mbs upload
Antivirus
Norton 360
Browser
Chrome
Back
Top