Effacer les filtres
Effacer les filtres

Obtaining a path name and using it

3 vues (au cours des 30 derniers jours)
Frank
Frank le 20 Mai 2011
Hello!
I need some help with getting a path name of a created folder within a directory. The script will create a folder within a specified folder, but how do I get the path for the newly created folder?
Thanks
-Frank
Code
source_dir = uigetdir(); %Folder with the *.tif files
cd(source_dir); %Changes folder to chosen folder
mkdir('Target')
dest_dir(pathname)

Réponse acceptée

Arnaud Miege
Arnaud Miege le 20 Mai 2011
source_dir = uigetdir(); %Folder with the *.tif files
cd(source_dir); %Changes folder to chosen folder
mkdir('Target');
dest_dir = [pwd '/Target'];
  1 commentaire
Frank
Frank le 20 Mai 2011
Thank you!

Connectez-vous pour commenter.

Plus de réponses (1)

Oleg Komarov
Oleg Komarov le 20 Mai 2011
pathname = [cd filesep 'Target'];
  1 commentaire
Frank
Frank le 20 Mai 2011
Thank you!

Connectez-vous pour commenter.

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by