WinSCP does indicate the password change request by an exit code, if that's what you mean.
All you can do is to parse the script output to find the password change prompt.
Thank you very much for your reply and all your hard work.
Is it possible for the script to know that a password change has been requested? So it can at least tell the operator to change it?
No, WinSCP does not support automatic password change.
I have a script that logs into an SFTP server and uploads and downloads files. Periodically the server wants a password change. Is it possible to script the password change? Thanks an advance for any advice!