First I do this:
mkdir firstFolder
Then:
mkdir firstFolder/secondFolder
Here an error occurs. The command line interface returns "incorrect syntax". What is the right syntax?
I am using Bash upon Cmdr in Windows 7.
First I do this:
mkdir firstFolder
Then:
mkdir firstFolder/secondFolder
Here an error occurs. The command line interface returns "incorrect syntax". What is the right syntax?
I am using Bash upon Cmdr in Windows 7.
You think it's Bash but maybe it's not. CMD in Windows has mkdir too but the directory separator is \.
Try
mkdir firstFolder\secondFolder
In Bash the backslash would be interpreted as (unnecessary) escape character, the command would create a directory named firstFoldersecondFolder. If it creates secondFolder inside firstFolder then you're not in Bash.
You can use this to create the whole tree in one go and avoid the error:
mkdir -p firstFolder/secondFolder/thirdFolder
The -p parameter is defined as:
-p, --parents no error if existing, make parent directories as needed
Note: This depends on how close to the Linux standard is implemented mkdir in your environment.