| Author | Message |
|---|---|
|
user5000
Guest |
Posted: 6 Aug 2012 20:22
I have tried uploading files from two different servers (Server A and Server B) to an FTP server using WinSCP. To do this, I have manually written out the following single line into the command prompt:
Code: winscp.exe /console /command "option batch abort" "open ftp://username:password@url.com" "put C:\*.txt cd /Test/" "exit" From either server, this command works. Next, I tried turning this single command into a batch program which goes like this (because I want to schedule to command above--which I can do with a batch program and the Windows Task Scheduler): Code: cd "C:\Program Files (x86)\WinSCP"
winscp.exe /console /command "option batch abort" "open ftp://username:password@url.com" "put C:\*.txt cd /Test/" "exit" When run manually (I have not attempted scheduling the batch yet), in the case of Server A, this batch executes, but in the case of Server B, it does not. What types of settings/configurations should I be reviewing and tweaking on Server B to make the batch program run? Also, should I try something else in the "option batch xxx" part? I tried all four available combinations (on, off, abort, continue) but had the same results each time. Also note, I tried generating a log, but no log is generated in the case of Server B, which would indicate to me that the entire batch is simply failing (as opposed to other possibilities, such as a typo in the URL or some other networking problem). |
|
prikryl
Site Admin
Joined: 10 Dec 2002
Posts: 16448 Location: Prague, Czech republic |
Posted: 13 Aug 2012
Replace the winscp.exe with winscp.com and check what output you see in the console windows.
You are also apparently missing quotes in the command: winscp.exe /console /command "option batch abort" "open ftp://username:password@url.com" "put C:\*.txt" "cd /Test/" "exit" _________________ Martin Prikryl |
| Advertisements |
|
You can post new topics in this forum
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!
Site design by Black Gate