SingleFile icon indicating copy to clipboard operation
SingleFile copied to clipboard

Add set default path support for saving to filesystem

Open scruel opened this issue 2 years ago • 11 comments

Describe the solution you'd like Able to specify the default path for saving the pages.

scruel avatar Nov 18 '21 02:11 scruel

Thank you for the suggestion, I agree with you. Note that you should be able to achieve this with the filename template but I can understand that it is not very practical.

gildas-lormeau avatar Nov 18 '21 20:11 gildas-lormeau

Again, I forgot this option already exists... The option --output-directory should do the job. Regarding the extension, they cannot save pages outside the download folder.

gildas-lormeau avatar Nov 18 '21 21:11 gildas-lormeau

Again, I forgot this option already exists... The option --output-directory should do the job. Regarding the extension, they cannot save pages outside the download folder.

OK, but this option is only for CLI now, not for the browser plugin when saving in file system. For browser plugin, I can only select one destination for saving pages now. But sometimes I want to save to multiple destinations for backup reason(with an option "no need to show the 'save as' dialog"), so may change the radio to checkbox for destinations will be better.

scruel avatar Nov 19 '21 00:11 scruel

Extensions cannot write files outside the Downloads folder. However you can use the filename template to save pages into sub-folders. Note also that you could use profiles to define different sub-folders. For example, you could create a profile named "backup" with a filename template beginning with backup/.

gildas-lormeau avatar Nov 21 '21 22:11 gildas-lormeau

For example, you could create a profile named "backup" with a filename template beginning with backup/.

Unfortunately, this doesn't work for me. I navigated to "Extension options" -> "File name" -> "template" and changed the default settings to "backup/{day-locale}.{month-locale}.{year-locale}.html". The slash is replaced by an underscore and it is still saved into the same, main Downloads folder.

system info

Windows 7 (64x) Chrome v96.0.4664.110 SingleFile Extension v1.19.24

mjrawesome avatar Dec 27 '21 23:12 mjrawesome

Please make sure Misc. > save pages in background is enabled.

gildas-lormeau avatar Dec 28 '21 00:12 gildas-lormeau

Please make sure Misc. > save pages in background is enabled.

Thanks for an ultra fast reply. I enabled the setting in Misc, but the file is still saved into the same directory. Except now the file name doesn't seem to follow the template at all (e.g. with "backup/{year-locale}.html", I get "574f1233-b013-45f2-a608-8232dbead111.htm" instead of "2021.html").

mjrawesome avatar Dec 28 '21 00:12 mjrawesome

This is unfortunately a bug in Chrome, see https://bugs.chromium.org/p/chromium/issues/detail?id=892133. Using a separate/new profile might help. There is nothing I can do to fix it on my end. Note that this bug is specific to Chomium-based browsers.

gildas-lormeau avatar Dec 28 '21 01:12 gildas-lormeau

@gildas-lormeau This is very unfortunate and it will likely affect other Chromium-based browsers, like Opera (confirmed by me), Edge (not tested), Samsung Internet Browser (not tested), which only leaves Safari and Firefox of the popular ones.

I don't have the same problem with either "DownloadThemAll" or "Simple mass downloader", both of which seem to save into subdirectories just fine. Perhaps a similar solution could be implemented here.

At any rate, thank you for creating and maintaining this otherwise excellent extension.

mjrawesome avatar Dec 28 '21 15:12 mjrawesome

Actually "DownloadThemAll" or "Simple mass downloader" might be probably the cause of this bug. I know that there is more chances to see it when download managers are installed.

gildas-lormeau avatar Dec 28 '21 22:12 gildas-lormeau

You can create a symlink in your download folder to the actual target folder. Job done!

Example template: name-of-the-symlink/{page-title}.zip.html

maliayas avatar Jul 28 '22 13:07 maliayas

Again, I forgot this option already exists... The option --output-directory should do the job. Regarding the extension, they cannot save pages outside the download folder.

Wait, what? I've been saving outside the download folder for ages, it asks me where it wants to save. There reason I'm here looking for help is because today it suddenly stopped asking me and started always automatically saving to the download folder. But that never happened before today, I've never saved to the Download folder before.

kupietools avatar Nov 05 '22 23:11 kupietools

This is terrible. It's just not plausible that there is no option to select a folder selection when saving a page. So annoying...

GithubUser99999999 avatar Feb 12 '23 20:02 GithubUser99999999

@GithubUser99999999 This issue can easily be circumvented with SingleFile Companion Lite, see https://github.com/gildas-lormeau/single-file-companion-lite

gildas-lormeau avatar Feb 12 '23 21:02 gildas-lormeau