How to save a file with a dialog box

13 visualizaciones (últimos 30 días)
Paul Nanfah
Paul Nanfah el 11 de Mayo de 2016
Editada: Azzi Abdelmalek el 11 de Mayo de 2016
hi everyone, I want to save a MyFile.txt from the current folder in another folder with a dialog box so that I can change the name and the folder. i used
[file,path] = uiputfile('MyFile.txt','Save my file');
hier the dialog box get opened but there is no saved file when i save. so I thought I could used this one
copyfile('MyFile.txt',uigetdir('C\:',);
but it doesn't work either. how can i do that?
Thank you

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 11 de Mayo de 2016
Editada: Azzi Abdelmalek el 11 de Mayo de 2016
[file,path]=uigetfile
name=fullfile(path,file) % The file name with the path
df='destination' % Your destination folder
nameF=fullfile(df,file);
copyfile(name,nameF)

Categorías

Más información sobre Files and Folders en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by