Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Temporary directory cleanup not seeing files

OK, will see if more people ask for this.
raina

Re: Temporary directory cleanup not seeing files

martin wrote:

Cannot you just uncheck the Keep temporary copies of remote files in deterministic paths, as you do not want it?


Well, then the opened files all end up in their separate scp????? subdirectories and not in the same hierarchy. One thing is this doesn't feel as neat because the files' location relative to each other doesnt't reflect the server. But as a more practical matter with the paths expanded in my editor's side pane tree, opening for example three files from a server's directory takes up 24 lines of display space where as deterministic takes just 9.
martin

Re: Temporary directory cleanup not seeing files

Cannot you just uncheck the Keep temporary copies of remote files in deterministic paths, as you do not want it?
raina

Re: Temporary directory cleanup not seeing files

Ah, quite right. But could the latter part possibly be made optional? :)
I'm currently looking into scripting the launching of WinSCP so that my temp directory will be cleared if WinSCP isn't already running.
martin

Re: Temporary directory cleanup not seeing files

That's by design. As documented:
Check Keep temporary copies of remote files in deterministic paths to make WinSCP avoid using random part of the path to local copies of remote files. It also makes WinSCP retain the copies even after exit.

See https://winscp.net/eng/docs/ui_pref_storage#temporary_directory
raina

Temporary directory cleanup not seeing files

Hi,

I have basically every option in set Preferences > Storage > Temporary directory and additionally, use a custom directory of "%temp%\WinSCP". This works beautifully to keep the temporary files of multiple sessions separate and organized clearly under session names and corresponding to the servers' hierarchy. And the custom directory is a good, clean entry point for an editor's (VS Code) integrated file tree/browser with nothing but WinSCP files.

The only problem I'm seeing is that WinSCP never automatically asks to clean up the files as it would with simpler/default settings. Nor does it find anything when using the Clean Up... function manually from the connection dialog. And the reason seems pretty clear looking at the Cleanup application data dialog: The Temporary folders option is pointing to "%temp%\Winscp\scp?????". With my settings, no scp????? directories ever appear, just the likes of "%temp%\WinSCP\session_name\long\path\to\file".

I'm thinking no "scp*", no cleanup. Right?

Would it be possible to add the saved session names to the lookup? Or even tell WinSCP that a temp directory is safe to be cleaned up with a "*.*" mask?