Oct-07-2016, 08:26 PM
(Oct-07-2016, 02:54 PM)wavic Wrote: I am not sure if this is PowerShell or just cmd.
Actually it's both, kind of. mkdir (or md) when used in powershell calls on PS's 'New-Item' cmdlet. The -p switch only exists in the unix/linux world, not DOS/Windows. So when PS parses the command, it ignores the '-p'. In cmd.exe the function mkdir does not ignore it, it fact it assumes it is another argument, "mkdir -p i/like/icecream" will actually create a directory "-p" as well as the directory tree "i/like/icecream". As you can imagine, there are heated debates on both sides on whether or not to use DOS commands or strictly cmdlets in powershell.
So my answer to the question, in the short term, use the mkdir or md in powershell, you're not going to break anything. In the big picture though, using DOS commands may end up in naming conflicts with PS, causing unexpected results. If you are planning on using powershell, then I would suggest learning powershell.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition