How to name files and trigger file transfer

Advertisement

jchat
Guest

How to name files and trigger file transfer

I'm brand new to WinSCP. I am able to move the files I wish using the GUI, but I am now trying to automate it.

I was going to use a batch file to complete the upload to the site.

I am unsure what file I should save the file in. I'm also unsure how to name the file. In the training documents, it appears that I should name the file .txt, but that obviously is not a batch file.

So to summarize. When I generate the batch file code:

1. Where do I save the file?
2. What extension do I use to save it?

Thank you.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,390
Location:
Prague, Czechia

Re: How to name files and trigger file transfer

If you make WinSCP generate a batch file, you save it to a .bat file.

If you make WinSCP generate a script file, the file extension does not really matter, but a convention is to use .txt. But then you need an additional batch file, to execute WinSCP, passing it the .txt script file on command-line. A command example (to be used in the batch file) is shown as a comment at the end of generated script:
https://winscp.net/eng/docs/ui_generateurl#script

Reply with quote

Guest

Thank you for the response. Let's assume that I'm using a batch file. What folder do I save the batch file in? The one that the files being transferred are in?

Thank you.

Reply with quote

martin
Site Admin
martin avatar

Anonymous wrote:

What folder do I save the batch file in? The one that the files being transferred are in?
It does not matter, as long as the batch file/script uses absolute paths.

Reply with quote

Advertisement

You can post new topics in this forum