how can one specify a directory that websave saves files?

조회 수: 11 (최근 30일)
alpedhuez
alpedhuez 2022년 3월 12일
댓글: alpedhuez 2022년 3월 12일
I want to specify a directory that websave saves files. I checked https://www.mathworks.com/help/matlab/ref/websave.html. https://www.mathworks.com/matlabcentral/answers/581399-how-to-have-the-matlab-web-browser-automatically-save-a-downloaded-file-to-a-specified-directory-wit says to add the directory name to the file name. But I would hope to change the directory outside websave, Please advise.

채택된 답변

Jan
Jan 2022년 3월 12일
Using full path names is the reliable and efficient solution:
Folder = 'C:\Your\Favorite\Folder';
File = 'AsYouWant.html';
URL = 'https://www.mathworks.com/matlabcentral/answers/1670074';
websave(fullfile(Folder, File), URL)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by