Topic "How to name files and trigger file transfer"

Author Message
jchat

Guest


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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26515
Location: Prague, Czechia
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
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26515
Location: Prague, Czechia
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.
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License