Minichan

Topic: Why does the "cd" command not work sometimes in cmd?

Anonymous A started this discussion 12 years ago #34,104

I need to test Perl scripts and whenever I cd to the location of them. I get...

is not recognized as an internal or external command, operable program or batch file.

Anonymous B joined in and replied with this 12 years ago, 21 minutes later[^] [v] #471,010

Why are you trying to command your computer to crossdress?

Anonymous C joined in and replied with this 12 years ago, 2 hours later, 3 hours after the original post[^] [v] #471,014

@OP
You're putting a space between cd and the path, yes?

(Edited 10 seconds later.)

Anonymous A (OP) replied with this 12 years ago, 9 minutes later, 3 hours after the original post[^] [v] #471,016

@previous (C)
Yes.

Anonymous C replied with this 12 years ago, 29 minutes later, 3 hours after the original post[^] [v] #471,018

@previous (A)
What commands are giving you trouble? cd $somepath should tell cmd to crossdress as $somepath. Can we have an example of a command you are using that gives you the error?

Also: Silly me, a space isn't always required in a DOS-style command line. cd followed by a period or backslash often gets interpreted just fine.

Anonymous A (OP) replied with this 12 years ago, 6 minutes later, 3 hours after the original post[^] [v] #471,019

@previous (C)

> cd C:\Sites\cgi-bin\chap05

Anonymous C replied with this 12 years ago, 15 minutes later, 4 hours after the original post[^] [v] #471,021

@previous (A)
That looks like it should work. Even if you added an extra backslash at the end, it should fail some error message about how it can't go to that path. It shouldn't tell you cd isn't a valid command. When does cd work correctly?

Anonymous A (OP) replied with this 12 years ago, 21 hours later, 1 day after the original post[^] [v] #471,186

@previous (C)
It usually works whenever I first attempt it after booting up my computer and now when I just tried it. I am getting those messages again.

I tried searching, but it seems like the issue with this was for other problems.

EDIT: I just added an end slash to it and it worked.

(Edited 31 seconds later.)

:

Please familiarise yourself with the rules and markup syntax before posting.