In cmd can be used command mkdir /data/rs1 /data/rs2 /data/rs3
like:
Everything is correct:
But how to realize it in powershell?
I'm trying to use quotes, for example:
With quotes I'm getting just one folder and having the issue in powershell:
mkdir : Could not find part of the path "rs3".
строка:1 знак:1
+ mkdir "/data/rs1 /data/rs2 /data/rs3"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\data\rs1 \data\rs2 \data\rs3:String) [New-Item], DirectoryNotFoundException
+ FullyQualifiedErrorId : CreateDirectoryIOError,Microsoft.PowerShell.Commands.NewItemCommand
Without qoutes also the issue and haven't any folders :
mkdir : Can not find a positional parameter that takes an argument"/data/rs2".
строка:1 знак:1
+ mkdir /data/rs1 /data/rs2 /data/rs3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [mkdir], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,mkdir
To avoid the issues, I can write without spaces:
PS C:\data> mkdir /data/rs1/data/rs2/data/rs3
But it will be one folder rs1
that contains inside rs2
and rs3
:
C:\data\rs1\data\rs2\data\rs3
I appreciate any help.