Topic "How do I script WinSCP to only transmit specific files in a specific order"

Author Message
Shango

Guest


I have a task where a large file (300-500MB) must be sent to a remote directory, followed by three much smaller files (1K each). The files must be transmitted in a specific order, with the largest going first, followed by the remaining three. The order would look like this (for example):

001_Testfile_0001.zip
001_Testfile_0001.ack
04_Testfile_0001.csv
04_Testfile_0001.ack

I should add that the ZIP file has to be in place before the first ACK file, so the order above is important. I can't find anywhere in the help to advise how to write a script to do this with WinSCP. Is it possible? Any help would be appreciated. I'm new to SFTP and scripting in general, so please bear with me.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Just use 4 consecutive upload (put) commands:

put 001_Testfile_0001.zip
put 001_Testfile_0001.ack
put 04_Testfile_0001.csv
put 04_Testfile_0001.ack
Shango

Guest


prikryl wrote:
Just use 4 consecutive upload (put) commands:

put 001_Testfile_0001.zip
put 001_Testfile_0001.ack
put 04_Testfile_0001.csv
put 04_Testfile_0001.ack


Sorry for got to mention there's about 30 or 40 files similarly named. So theres also 001_Testfile_0002.zip, 001_Testfile_0002.ack etc...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
So then you have to write a script (e.g. PowerShell) that generates WinSCP script with the files in the order you need.
Advertisements

You can post new topics in this forum






Search Site

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