I am trying to follow some instructions for creating a directory using the command line. The instructions are:
$ export PROJ_HOME=$HOME/proj/111 $ export PROJECT_BASEDIR=PROJ_HOME/exercises/ex1 $ mkdir -p $PROJ_HOME
Are these windows commands? Are there windows equivalents?
To reference a variable in Windows, use %varname% (with prefix and suffix of '%' ). For example, you can use the echo command to print the value of a variable in the form " echo %varname% ".
The where command is a Windows which equivalent in a command-line prompt (CMD). In a Windows PowerShell the alternative for the which command is the Get-Command utility.
To translate your *nix style command script to windows/command batch style it would go like this:
SET PROJ_HOME=%USERPROFILE%/proj/111 SET PROJECT_BASEDIR=%PROJ_HOME%/exercises/ex1 mkdir "%PROJ_HOME%"
mkdir on windows doens't have a -p parameter : from the MKDIR /? help:
MKDIR creates any intermediate directories in the path, if needed.
which basically is what mkdir -p (or --parents for purists) on *nix does, as taken from the man guide
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With