In Windows cmd
& is a special character used for separating multiple commands on a single line
& [...] command1 & command2
Use to separate multiple commands on one command line. Cmd.exe runs the first command, and then the second command.
As a result
cd Creating Project & External Execution will be executed as
cd Creating ProjectExternal Execution
as Fleet Command have said. Since there's no folder called "Creating Project" and no command named
External, you got the above errors.
To solve this you have to escape the
& somehow. There are 2 ways:
- Put quotes around the name because inside quotes
& loses its special meaning
If it is a quote (
") toggle the quote flag, if the quote flag is active, the following special characters are no longer special:
^ & | < > ( ).
How does the Windows Command Interpreter (CMD.EXE) parse scripts?
cd "Creating Project & External Execution"
cd Creating Project ^& External Execution
No need to escape the spaces because
cd works fine with spaces in filename1. But if you want you can still escape the spaces like this
cd Creating^ Project^ ^&^ External^ Execution without problem
1Space is not a delimiter in
C:\>cd /?Displays the name of or changes the current directory.CHDIR [/D] [drive:][path]CHDIR [..]CD [/D] [drive:][path]CD [..].. Specifies that you want to change to the parent directory....CHDIR command does not treat spaces as delimiters, so it is possible toCD into a subdirectory name that contains a space without surroundingthe name with quotes. For example:cd \winnt\profiles\username\programs\start menuis the same as:cd "\winnt\profiles\username\programs\start menu"which is what you would have to type if extensions were disabled.