Oct-08-2016, 01:37 PM
(This post was last modified: Oct-08-2016, 01:42 PM by sparkz_alot.)
(Oct-08-2016, 12:13 PM)wavic Wrote: Why don't you run mkdir --help or mkdir -h and see which is the proper command
In windows cmd, it would be "help mkdir" or "help md" or "mkdir /?" otherwise you create the directories "--help" or "-h"
Quote:I tried entering in PowerShell, not cmd. It doesn't ignore just the '-p', but rather the whole command returns an error message. I've just tried in in cmd.exe and both "mkdir x/y/z" and "mkdir -p x/y/z" return syntax errors.
It would be helpful to see the actual error message. It could be that PowerShell is running in "restricted mode" and you might need to set it to "unrestricted". You can check this by typing this in PS
get-executionpolicyif it shows "restricted" you get set it to "unrestricted" by typing this in PS
set-executionpolicy unrestrictedmake sure to reset it to the original level when your done testing.
Quote:So am I correct to understand that the maker of the tutorial made a mistake in including the -p in the windows part of the tutorial and saying you can't delete non-empty files?
not entirely
In windows cmd, you can use "rmdir /s" to remove an entire directory tree.
In PS, you would just use "rmdir" and you will be prompted.
As for the cmd.exe terminal, again it would be helpful to see the actual error message. It's possible the "Command Extensions" are disabled, but that is unlikely since they are enabled by default...but still a possiblity
Sorry forgot to add
Quote:I've just tried in in cmd.exe and both "mkdir x/y/z" and "mkdir -p x/y/z" return syntax errors.
in windows, the 'slashes' are in the opposite direction, so it would be
[code]
mkdir x\y\z
[\code]
In a python script, the form "x/y/z" would work
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