AGG_MS
Joined:
Posts:
3
Location:
Dortmund

Hello,
i tried several Times to generate a Batch Script to upload Files from Local C:\Users\%User%\Desktop\Test to an SFTP Server //vrspoftp/TEST/JAMA/OUT/ORDERS/.
I generate a fingerprint with WinSCP but it didn't work (sftp://vrspoftp;fingerprint=ssh-ed23418-AoEf9IR0MRCBMA1SS7ykBo9t-3zXrNYyiYkwffSUCds@183.94.1.89/vrspoftp/TEST/JAMA/OUT/ORDERS/)
To start the Upload I have the command line
put "C:\Users\%User%\Desktop\*.raw /vrspoftp/TEST/JAMA/OUT/ORDERS/"
What am I doing wrong?

With Greets from Germany AGG_MS

martin
Joined:
Posts:
38,408
Location:
Prague, Czechia

Re: Upload to SFTP with Batch

You didn't show us what are you doing, nor did you describe your problem. Please give us more details. Also please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

AGG_MS

Problem is solved

Hello, the path was not correct in its syntax. Therefore the script did not work properly. In the line with the command open I have the folder where I want to store the data in the SFTP server. I then had this in the line with the put command.
After I deleted it, the upload of the data works without any problems. Furthermore, I no longer log on to the SFTP server with my fingerprint, but with a password, username and IP.

martin