Take the 2-minute tour ×

I can no longer use / at the windows xp command prompt, and it seems to have started after a botched cygwin installation, e.g. cd /windows won't work, but used to.

Can anyone think of how this might have happened?

OOPS! It doesn't normally work in XP, though I had read that it does in Vista. I simplified my problem and it was wrong. The real problem is:

I was using the cwrsync binaries (meant for cygwin use) that can be used at the command prompt in a way such as:

ssh -i /keydir/keyfile user@server

but after doing something (seems like it was installing cygwin), and even after reinstalling the cwrsync files, I can now only do:

ssh -i \keydir\keyfile user@server, i.e. I have to use the windows convention when referring to local files.

I posted this on the cwrsync forum, but it's not very active, so I was hoping someone might recognize what's going on here, I should maybe try the cygwin forum too.

share|improve this question
I believe the tags "forward" and "slash" were supposed to be one tag: "forward-slash". Could someone fix that, please? Or just delete the "forward" tag, but I think "forward-slash" is preferable to "slash" as a tag. –  Alan Moore Oct 14 '08 at 6:00
add comment

2 Answers

Actually, since DOS 2.0, the kernel and file APIs have always supported forward slash, and many command line calls. See: http://blogs.msdn.com/larryosterman/archive/2005/06/24/432386.aspx.

I used to go to great pains to detect the OS and use a PATH_SEPARATOR type constant in PHP, when I discovered this by accident (it's use is now considered deprecated, in lieu of a simple "/").


share|improve this answer
According the the MSDN, forward slashes are preferred over single and double backslashes for hardcoded paths in source code and in the registry. Support for them in user programs is variable however. –  James Broadhead Apr 26 '11 at 12:53
add comment

You imagined it - it never worked.

If you happen to be in C:\ and type

C:\>cd /windows

it will take you to C:\WINDOWS\ but that's only because /windows is not a valid option to cd, so it tries ignoring the /.

Forward slash is a path separator in UNIX and cygwin, but Windows uses it for commandline options, eg. dir /w.

share|improve this answer
I haven't tested this on XP, but Windows 7 definitely allows things like cd C:/Windows/System32. –  Mehrdad Sep 6 '11 at 2:46
add comment

Your Answer


