I'm new here and I hope I can get a solution for my issue :
I have a script that upload or download a file on a remote computer using WinSCP and SFTP. The file in question has a variable name so I have to use a filter.
I use the following command to download the file on the remote computer :
"get -delete /home/test/*.csv d:\"
Problem : if no file has been found in /home/test/ using a filter like *, the return code is 0.
The script return an error (code 1) when I use (test.csv doesn't exist):
"get -delete /home/test/test.csv d:\"
Is it possible to have an error when the directory is empty or no file has been downloaded ?
Thanks for your help,