how can one specify a directory that websave saves files?

14 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Jan
Jan il 12 Mar 2022
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)

Più risposte (0)

Categorie

Scopri di più su File Operations in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by