Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nested mkdir inside directory with spaces

This command:

mkdir "watermelon fun"\example

Outputs the following:

PS C:\Users\Andrés\temp> mkdir "watermelon fun"\example
mkdir : No se encuentra ningún parámetro de posición que acepte el argumento     '\example'.
En línea: 1 Carácter: 1
+ mkdir "watermelon fun"\example
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [mkdir],     ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,mkdir

Is there a way you can create a nested directory, being one of these a multiple word directory?

like image 321
Hello_World Avatar asked Nov 27 '25 07:11

Hello_World


1 Answers

You have to surround the complete path with quotes:

mkdir "watermelon fun\example"
like image 65
sodawillow Avatar answered Nov 29 '25 20:11

sodawillow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!