Lost use of forward slash in windows command prompt
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
.
Admin
Updated on June 05, 2022Comments
-
Admin almost 2 years
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.
-
user541686 over 12 yearsI haven't tested this on XP, but Windows 7 definitely allows things like
cd C:/Windows/System32
. -
Peter - Reinstate Monica about 6 years@Mehrdad But you notice the difference --
C:/
does not begin with a slash which is the reason it's not mistaken for a command line option, as opposed to the OP's path. -
user541686 about 6 years@PeterA.Schneider: Try
C: && cd /Windows
. (Also, I just tested it on XP, and it doesn't work there. So I guess it's a newer feature.)