how can one specify a directory that websave saves files?

10 vues (au cours des 30 derniers jours)
alpedhuez
alpedhuez le 12 Mar 2022
Commenté : alpedhuez le 12 Mar 2022
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.

Réponse acceptée

Jan
Jan le 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)

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by