Re: winscp scipting
You can find a very similar example in documentation.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.