Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can PuTTY create new folders for log files?

1,259 views
Skip to first unread message

Francisco David del Campo Hill

unread,
Feb 10, 2021, 6:29:53 AM2/10/21
to
Dear All,

First time posting here, so apologies if the format of the question is unusual...

I am using PuTTY 0.74 (Windows x64 installer), and would like it to record the output of my SSH sessions. I know how to set up the session logging settings to save the output to a file in an existing folder; for example:

Log file name: C:\Users\me\Desktop\putty-&H-&Y&M&D-&T.log

But I would also like to automatically classify these log files into folders by date, so I tried:

Log file name: C:\Users\me\Desktop\PuTTY-&Y&M&D\putty-&H-&Y&M&D-&T.log

Sadly this gave an error when I opened the SSH session:

Error writing session log (ASCII mode) to file: C:\Users\me\Desktop\PuTTY-20210210\putty-a.b.c.d-20210210-112314.log

It seems that PuTTY was not able to create the folder (...\PuTTY-20210210\...) before creating the log file (...\putty-a.b.c.d-20210210-112314.log). I have already tried to open PuTTY as administrator with the same result, so I doubt this is a permissions problem.

Does anyone know how to make this work? Is this simply not possible with current PuTTY and should be asked as a feature request?

Thank you in advance for your help.

Yours,

David

Kaz Kylheku

unread,
Feb 10, 2021, 11:24:51 AM2/10/21
to
On 2021-02-10, Francisco David del Campo Hill <frd...@gmail.com> wrote:
> Does anyone know how to make this work? Is this simply not possible
> with current PuTTY and should be asked as a feature request?

It sounds like the directory is required to exist: all path components
up to the file name. I'd just live with that. You already have the
date interpolated into the name, so send the files to a common folder.

You can have some script that runs every midnight and moves files
into dated folders.
0 new messages