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: PostRe: PostRe: Return code when using the put command b

This issue has been added to tracker.
Guest

PostRe: PostRe: Return code when using the put command by a

Unfortunately that's not what I want to achive. I would expect a return code unequal to 0 when a command finally doesn't execute what I initially wanted the command to do

=> put command
- return code: 0; when the command really stored a file on the remote server
- return code != 0; when the command didn't store the desired file on the
remote server

- e.g. return code: 1; file could not be stored because a file with the same
name already exists on the remote server
- e.g. return code: 2; file could not be stored because the remote directory
doesn't exist
- e.g. return code: 3; file could not be stored due to invalid characters in
the file name...
- etc.

Nevertheless, thank you for your time and feedback. WinSCP is a great tool and even can get greater...

Best regards
Joachim
martin

Re: PostRe: Return code when using the put command by a VBSc

thank you for your support/feedback. I tried it this morning but I still get the same return code telling me that the put command succeeded even the remote file hasn't been overwritten/replaced. :=((

That's true. This just prevents the file being overwritten. I suppose that this is what you need.
Guest

PostRe: Return code when using the put command by a VBScript

Hello,

thank you for your support/feedback. I tried it this morning but I still get the same return code telling me that the put command succeeded even the remote file hasn't been overwritten/replaced. :=((

Best regards
Joachim
martin

Re: Return code when using the put command by a VBScript

You can try:
option confirm on

option batch abort
put ...
Guest

Return code when using the put command by a VBScript

Hello,

I'm using WinSCP via a VBScript. Currently I've got the following problem:

* I'm using the PUT command to upload a file example.txt to a remote server
* when I try to upload again the same file name the already existing file example.txt
gets replaced and the return code says "Everything's fine, no errors/problems occured"

But I want to avoid that an existing file on the remote server gets overwritten and want to avoid this by checking the return code of the WinSCP call I use.

Currently I always get a return code of 0, meaning that everything was o.k.

Any ideas how to achive this???

Thank you all in advance
Joachim