Take the 2-minute tour ×

need to create a file with directories and sub-directories while using the cli (command prompt window). Using relative paths.

share|improve this question

closed as not a real question by harrymc, Diago Nov 1 '10 at 12:10


What OS are you planning to do this on? –  Wuffers Nov 1 '10 at 2:42
windows---------------- –  kevin Nov 1 '10 at 2:48
Aahrgh! It hurts my eyes! Also, love how I edited it with the information 9 seconds before he posted it. –  Hello71 Nov 1 '10 at 2:48
@kevin: It is also better to use more descriptive text rather than fill with dashes. For instance, you could have worded your comment like: "I am planning to do this on Windows." –  Wuffers Nov 1 '10 at 2:54
"file with directories and sub-directories" doesn't exist, so it is really hard to understand what exactly you are asking. –  harrymc Nov 1 '10 at 10:36
show 1 more comment

2 Answers

up vote 1 down vote accepted

The mkdir command is what you're looking for.


mkdir directory\subdir\anothersubdir
share|improve this answer
@kevin: If you are questioning the helpfulness of this site's users you should review your brief history here. You keep asking incomplete/ambiguous questions and people keep having to ask you for more information to help you. Despite receiving useful answers you have not yet marked any questions as answered. If you do not improve the quality of your questions and start participating by accepting answers then you should expect to receive some less-than-helpful comments from other people. –  Mike Fitzpatrick Nov 1 '10 at 4:36
@kevin How was my answer insensitive or arrogant? I apologize if it seemed that way to you. And, if any of my comments seemed arrogant, I was just trying to help you so it would be easier for others to answer your questions. –  Wuffers Nov 1 '10 at 12:22
add comment

Maybe something like:

mkdir subdir\subdir2

copy NUL subdir\subdir2\newfile

That will create subdir\subdir2 (a new dir subdir, and then new subdir2 inside subdir) from your relative location and give you a 0 byte file in that location.

share|improve this answer
add comment
