gow
gow copied to clipboard
mkdir -p gives error
mkdir -p e\f\g\h A subdirectory or file -p already exists. Error occurred while processing: -p.
looks like -p option is not supported by mkdir of gow
Because mkdir is a cmd.exe builtin. You must use mkdir.exe -p e\f\g\h
C:\>which mkdir
which gives me
C:\Program Files (x86)\Gow\bin\mkdir.EXE
lies.
I used gow make only . mkdir.exe -p e\f\g\h -> should actually create parent directories e,f,g,h But above command creates a directory with name -p and e,f,g,h. look like -p option is not supported and it is treating -p as another directory name
C:\Qualcomm\Hexagon_SDK\new>which mkdir C:\Qualcomm\Hexagon_SDK\3.0\tools\utils\gow-0.8.0\bin\mkdir.EXE
C:\Qualcomm\Hexagon_SDK\new>mkdir.exe -p e\f\g\h
C:\Qualcomm\Hexagon_SDK\new>ls -p e
C:\Qualcomm\Hexagon_SDK\new>mkdir.exe -p e\f\g\h\k A subdirectory or file .exe already exists. Error occurred while processing: .exe. A subdirectory or file -p already exists. Error occurred while processing: -p.
C:\Qualcomm\Hexagon_SDK\new>
Freaking Microsoft.
"mkdir.exe" -p e/f/g/h
what does it mean when you use mkdir.exe in quotes
When CMD.EXE sees mkdir (without quotes), as a built-in command, CMD chooses to execute that command itself, even though by adding the .exe, one would think that would tell CMD to use the .exe, not the built-in command, in this case, CMD just decides to use the . as a separator and use the built-in command. By putting mkdir.exe in double quotes, this forces CMD to actually treat the command as NOT a built-in command, and actually executes mkdir.exe.
Hope that explains it for you.