Wget URL after File Upload

Advertisement

VanLuda
Joined:
Posts:
1
Location:
Grand Rapids, MI

Wget URL after File Upload

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://www.example.com/" and "start "" https://www.example.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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Wget URL after File Upload

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:

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://www.example.com/

Reply with quote

Advertisement

You can post new topics in this forum