Change working directory in batch

Today I found that I need /d parameter to change directory in a batch file.

For example:

cd /d c:\java

It should look something like this during the execution:

c:>test.bat

c:\java>

Advertisements

8 Responses to Change working directory in batch

  1. anchormath says:

    Thanks – I was looking for this and found surprisingly little out there for a basic need like this!

  2. Nick says:

    Thanks!! Sweet and simple, right to the point. I needed this in a pinch.

  3. ITGuru4U says:

    Awesome… just what I needed 🙂 from one developer to another… thanks mang!

  4. samlple says:

    super & thank you very much

  5. Stevie says:

    Excellent! Just what I needed, and better than other solutions out there that I found…

  6. Javed Alam says:

    thanks its made my work very easy

  7. minhkang says:

    that is needed only when you change drive. try “cd /?”

  8. Stefan says:

    Really helpful! Thank you very much!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: