0

This is essentially a duplicate of this question, with the difference that the answer given does not seem to work. I also want to use a batch script to change the directory, but the given answer does no work:

cd /C C:\Users
The specified path is invalid.

What am I missing?

2
  • You send /C instead of /D ? Commented Jul 24, 2014 at 5:50
  • Oh, it looked to me /D denotes the drive letter. So with this option it works. Commented Jul 24, 2014 at 5:51

1 Answer 1

2

cd /C c:/Users does not work for me either

But

cd /D c:\Users

...works fine, as described here: How to change current working directory using a batch file

Syntax:

CD [/D] [drive:][path]
CD [..]
Sign up to request clarification or add additional context in comments.

1 Comment

Yes, it would be good to know that /D is an option and not some obscure 'thing'. You never can be sure if expressions are options like /D or -d or --d or wahtever, or some crazy windows batch exception.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.