Topic "Wget URL after File Upload"

Author Message
VanLuda
[View user's profile]

Joined: 2016-02-15
Posts: 1
Location: Grand Rapids, MI
Hello, I'm fairly new to scripting so I'm hoping some of you more advanced users will be able to guide me.

I've create a .bat file that works perfectly. It connects to the my server and uploads file automatically. Where I'm running into an issue is that I'd like it to run a URL once the upload is completed. It can be in a browser or with wget, either way doesn't matter to me. I only need it to tell the server to start processing a job.

This is what I have so far:

winscp.com /command ^
"open sftp://user:password@example.com/ -hostkey=""ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" ^
"cd /Change/Folder/" ^
"put C:\Users\VanLuda\Desktop\Upload.csv" ^
"exit"

When it comes to running a URL, I'm not sure what to do to get the wget to work. I've tried adding "wget https://google.com" and "start "" https://google.com" nothing seems to work and I'm at a loss as to what to do to get this to work. Any advice would be greatly appreciated.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
The wget and start are Windows commands/programs. These are not WinSCP commands.

So you have to put them to a separate line in the batch-file, not on WinSCP command-line:

Code:
winscp.com /command ^
    "open sftp://user:password@example.com/ -hostkey=""ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" ^
    "cd /Change/Folder/" ^
    "put C:\Users\VanLuda\Desktop\Upload.csv" ^
    "exit"

wget https://google.com
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