Thread Subject: save file with specific path and name. please help.

Subject: save file with specific path and name. please help.

From: Jeroen

Date: 13 Nov, 2009 09:28:02

Message: 1 of 2

Hi everybody!

First, this is my second week with maltab. So I'm sorry if it looks stupid, but i really cant figure it out.
For my project I have to save a file to specific path with the date as name.
For that I want that the path can be changed in the .ini file of the program.

Now I tried to use uiputfile. With this function i can choose the name or the path. Not both and that is just what i want.

default.path = C:\Program Files
datum = date;
[name,path,index] = uiputfile(path+datum,name);
saveas(gcf,[path name])

Please help! I hope it is clear.
Thank you anyway!

gr jeroen

Subject: save file with specific path and name. please help.

From: ImageAnalyst

Date: 13 Nov, 2009 11:10:37

Message: 2 of 2

On Nov 13, 4:28 am, "Jeroen " <bin...@gmail.com> wrote:
> Hi everybody!
>
> First, this is my second week with maltab. So I'm sorry if it looks stupid, but i really cant figure it out.
> For my project I have to save a file to specific path with the date as name.
> For that I want that the path can be changed in the .ini file of the program.
>
> Now I tried to use uiputfile. With this function i can choose the name or the path. Not both and that is just what i want.
>
> default.path = C:\Program Files
> datum = date;
> [name,path,index] = uiputfile(path+datum,name);
> saveas(gcf,[path name])
>
> Please help! I hope it is clear.
> Thank you anyway!
>
> gr jeroen

--------------------------------------
Take a look at sprintf(), fileparts(), and fullfile() functions.
You also need single quotes around your path since it's a character
string.

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com