How to save a file with a dialog box

조회 수: 12 (최근 30일)
Paul Nanfah
Paul Nanfah 2016년 5월 11일
편집: Azzi Abdelmalek 2016년 5월 11일
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

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 5월 11일
편집: Azzi Abdelmalek 2016년 5월 11일
[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)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by