Topic "Temporary directory cleanup not seeing files"

Author Message
raina
[View user's profile]
Donor
Joined: 2012-10-02
Posts: 7
Location: Finland
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?
wtempsett.png (7.62 KB)

Description: WinSCP Temporary Directory settings

wtempsett.png

Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27058
Location: Prague, Czechia
That's by design. As documented:
Quote:
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
[View user's profile]
Donor
Joined: 2012-10-02
Posts: 7
Location: Finland
Ah, quite right. But could the latter part possibly be made optional? Smile
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◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27058
Location: Prague, Czechia
Cannot you just uncheck the Keep temporary copies of remote files in deterministic paths, as you do not want it?
raina
[View user's profile]
Donor
Joined: 2012-10-02
Posts: 7
Location: Finland
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.
comparison.png (39.18 KB) [Download]

Description: (none)

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27058
Location: Prague, Czechia
OK, will see if more people ask for this.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License