Q:

Create file and directories at the same time

I am trying to create a blank file and its directories.
I have tried to use cd. > foo\bar.txt but it wont also make the directory.
Thank you.

A:

The only thing I can suggest is to mkdir first and then crate file, in fact it's 2 instructions but you can execute it in one line
mkdir test& cd. > test\test.txt

