Command Prompt Header

TUTORIAL: open a directory in Command prompt

Opening a directory with Command prompt could be useful for example: open a directory on a different computer or server. Or open a directory on a NAS for a back-up. This way you can program a script that will open this temporarily directory and write the back-up to this letter.

If you’re using this code line it will create a network drive with the last letter possible in the alphabet. So for me that’s Z:\. I’ll explain it in a short and longer(images) version.

Short | How to open a directory in Command prompt

  1. Open Command Prompt
  2. Type in: pushd \\hostname\directory
  3. Now you’ve created a temporarily network drive.

Long | How to open a directory in Command prompt

First you’ll have to open Command prompt:

opencmdNow we’ve opened command prompt(cmd) type in the following command line: Pushd \\hostname\directory. In the example below I used my own laptop as the host name and my user map as the directory.

lineincmdtemporarilydirectory

Now you’ll see a network drive with the last letter of the alphabet possible. For me that’s Z:.

If you’ve any questions regarding this topic comment or contact me and I’ll be happy to help you out.

Published by

Bas

My name is Bas Wijdenes and I'm working full time as a services engineer at Wortell. In my free time I like to write tutorials about computer problems I encounter on a daily basis. The main reason I started my blog is, because I wanted to work on my English vocabulary. If you've encountered a computer problem you can't get your head around, please do not hesitate to contact me.

Leave a Reply

Your email address will not be published. Required fields are marked *