How to create a folder under program generated folder name?

4 vues (au cours des 30 derniers jours)
Febin Benjamin
Febin Benjamin le 9 Août 2013
One module of my project auto-generates the folder name but I am not able to create folder under that auto generated name. mkdir is not working.... please help.
  1 commentaire
Evan
Evan le 9 Août 2013
What do you mean by "mkdir is not working"? Are you getting an error? Is the name incorrect?

Connectez-vous pour commenter.

Réponse acceptée

per isakson
per isakson le 9 Août 2013
Modifié(e) : per isakson le 9 Août 2013
This works for me (R2013a)
folder_name = 'name_of_subfolder'; % this subfolder does not exist
parent_folder = 'h:\m\cssm'; % this folder exists
mkdir( parent_folder, folder_name )
What have you tried and what error message did you get?
.
Or, if neither folder_name nor parent_folder exists
folder_name = 'name_of_subfolder'; % this subfolder does not exist
parent_folder = 'h:\m\cssmXX'; % this folder does not exist
mkdir( fullfile( parent_folder, folder_name ) )

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by