Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostBuildEvent Create Directory

I'm trying to create a folder named Design in the build output folder using th following commandline in the PostBuildEvent in visual studio

mkdir $(TargetDir)Design  ....Runs Successfully but folder is not created mkdir "$(TargetDir)Design" ....Runs Successfully but folder is not created MD $(TargetDir)Design  ....Runs Successfully but folder is not created MD "$(TargetDir)Design"  ....Runs Successfully but folder is not created 

Can anyone tell me what I'm doing wrong

like image 358
Deepak Avatar asked May 09 '12 01:05

Deepak


2 Answers

You need to do something like:

if not exist DirToCreate mkdir DirToCreate 
like image 113
Eric Avatar answered Sep 27 '22 21:09

Eric


This worked for me (where Design is the folder you want to create):

mkdir $(TargetDir)\Design 

If you want to check for existence first:

if not exist $(TargetDir)\Design mkdir $(TargetDir)\Design 
like image 39
user2444499 Avatar answered Sep 27 '22 20:09

user2444499