Thread Subject: uigetfile fullfile and mkdir

Subject: uigetfile fullfile and mkdir

From: onur alptekin

Date: 3 Dec, 2008 09:00:19

Message: 1 of 3

hello;
i'm trying to generate a folder using uigetfile by gui. ui get file saves inputs in cell arrays.
I want to generate a folder in the name of input data.
for example ;
data(1)='12345'; % saved as cell because of the uigetfile function
f1=fullfile('C:', 'Program Files', 'MATLAB','R2008A,'work',data(1));
%last pathname(data(1)) should be 12345 by the input

if(exist(f1)==0)
   makedir(f1);
end

This code doesnt work correctly. I dont know how to export the data in cell array to the fullfile function.
Help please:)

Subject: uigetfile fullfile and mkdir

From: Ryan Ollos

Date: 3 Dec, 2008 09:10:22

Message: 2 of 3

"onur alptekin" <onur_alptekin@hotmail.com> wrote in message <gh5hr3$12c$1@fred.mathworks.com>...
> hello;
> i'm trying to generate a folder using uigetfile by gui. ui get file saves inputs in cell arrays.
> I want to generate a folder in the name of input data.
> for example ;
> data(1)='12345'; % saved as cell because of the uigetfile function
> f1=fullfile('C:', 'Program Files', 'MATLAB','R2008A,'work',data(1));
> %last pathname(data(1)) should be 12345 by the input
>
> if(exist(f1)==0)
> makedir(f1);
> end
>

Try:

data{1}='12345';
f1=fullfile('C:', 'Program Files', 'MATLAB','R2008A,'work',data{1});

Cell arrays need to be assigned / referenced with curly brackets.

Subject: uigetfile fullfile and mkdir

From: onur alptekin

Date: 3 Dec, 2008 10:40:19

Message: 3 of 3

"Ryan Ollos" <ryano@physiosonics.com> wrote in message <gh5idu$bmn$1@fred.mathworks.com>...
> "onur alptekin" <onur_alptekin@hotmail.com> wrote in message <gh5hr3$12c$1@fred.mathworks.com>...
> > hello;
> > i'm trying to generate a folder using uigetfile by gui. ui get file saves inputs in cell arrays.
> > I want to generate a folder in the name of input data.
> > for example ;
> > data(1)='12345'; % saved as cell because of the uigetfile function
> > f1=fullfile('C:', 'Program Files', 'MATLAB','R2008A,'work',data(1));
> > %last pathname(data(1)) should be 12345 by the input
> >
> > if(exist(f1)==0)
> > makedir(f1);
> > end
> >
>
> Try:
>
> data{1}='12345';
> f1=fullfile('C:', 'Program Files', 'MATLAB','R2008A,'work',data{1});
>
> Cell arrays need to be assigned / referenced with curly brackets.

It works thax alot

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
uigetfile fullf... onur alptekin 3 Dec, 2008 04:05:05
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com