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

Contact us at files@mathworks.com