Obtaining a path name and using it

3 次查看(过去 30 天)
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)

采纳的回答

Arnaud Miege
Arnaud Miege 2011-5-20
source_dir = uigetdir(); %Folder with the *.tif files
cd(source_dir); %Changes folder to chosen folder
mkdir('Target');
dest_dir = [pwd '/Target'];

更多回答(1 个)

Oleg Komarov
Oleg Komarov 2011-5-20
pathname = [cd filesep 'Target'];

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by