Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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/
VanLuda

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.