Topic "Windows Task to PUT files onto FTP location issue"

Author Message
Furyio
[View user's profile]

Joined: 2016-06-21
Posts: 4
Location: Dublin,Ireland
Hi all,

I'm currently using WINSCP to test an inbound and outbound file transfer in a testing environment. I'm using Windows Task Scheduler to do this. The server I'm working is using Windows Server 2003.

Below is the suffix I've placed onto the task, and I'm successfully able to retrieve files from the /deliverynotes location, and save them to the local directory defined.

FTP Get

Code:
/log=K:\DATA\FTP\Savage_and_Whitton\Logs\winscp_inbound.log /command "open sftp://applegreen:[Password]@217.37.98.165" "get /deliverynotes K:\DATA\FTP\Savage_and_Whitton\EDN" "exit"


Below is the entire string in the task
Code:
C:\PROGRA~1\WinSCP\WinSCP.exe /log=K:\DATA\FTP\Savage_and_Whitton\Logs\winscp_inbound.log /command "open sftp://applegreen:[Password]@217.37.98.165" "get /deliverynotes K:\DATA\FTP\Savage_and_Whitton\EDN" "exit"


I have the following as my suffix for an FTP PUT command

FTP PUT
Code:
/log=K:\DATA\FTP\Savage_and_Whitton\Logs\winscp_outbound.log /command "open sftp://applegreen:[Password]@217.37.98.165" "put K:\DATA\FTP\Savage_and_Whitton\SiteOrders /orders" "exit"


Below is the string in the task
Code:
C:\PROGRA~1\WinSCP\WinSCP.exe /log=K:\DATA\FTP\Savage_and_Whitton\Logs\winscp_outbound.log /command "open sftp://applegreen:[Password]@217.37.98.165" "put K:\DATA\FTP\Savage_and_Whitton\SiteOrders /orders" "exit"



I've attached the logs for the outbound PUT task. It is going through the files and recording it is moving them, but it is not. I've run this from cmdline using Winscp.com, and I can see there is 0B being marked against the files and a 0% status before it terminates.

Would greatly appreciate help. I did an original test on this in a W7 environment and all worked fine, but having problems trying to get my setup work in a server 2003 environment.

Last edited by Furyio on 2016-06-27 11:31; edited 1 time in total
winscp_outbound.log (45.82 KB) [Download]

Description: Log file for outbound PUT

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I do not see any problem in the log.

The output on the console says 0B because the files are indeed empty.

Can you add XML logging to the code and listing of the remote directory after the upload?

C:\PROGRA~1\WinSCP\WinSCP.exe /log=K:\DATA\FTP\Savage_and_Whitton\Logs\winscp_outbound.log /xmllog=K:\DATA\FTP\Savage_and_Whitton\Logs\winscp_outbound.xml /command "open sftp://applegreen:[Password]@217.37.98.165" "put K:\DATA\FTP\Savage_and_Whitton\SiteOrders /orders" "ls /orders" "exit"

And attach both the .log and the .xml

Can you also show logs from the Windows 7 for a comparison? (and with XML and the ls).
Furyio
[View user's profile]

Joined: 2016-06-21
Posts: 4
Location: Dublin,Ireland
martin wrote:
I do not see any problem in the log.


Yeah I guess that is kind of the problem. Everything looks like its completing successfully, but no file movement is taking place.

Quote:
The output on the console says 0B because the files are indeed empty.

Cool, woopsie on my part. I was adding text to some of the text files but left these blank. Nice spot!

Quote:

Can you add XML logging to the code and listing of the remote directory after the upload?

C:\PROGRA~1\WinSCP\WinSCP.exe /log=K:\DATA\FTP\Savage_and_Whitton\Logs\winscp_outbound.log /xmllog=K:\DATA\FTP\Savage_and_Whitton\Logs\winscp_outbound.xml /command "open sftp://applegreen:[Password]@217.37.98.165" "put K:\DATA\FTP\Savage_and_Whitton\SiteOrders /orders" "ls /orders" "exit"

And attach both the .log and the .xml


Will do. I'll add that shortly and run through a cycle and post back the logs.

Quote:

Can you also show logs from the Windows 7 for a comparison? (and with XML and the ls).


Will do
Furyio
[View user's profile]

Joined: 2016-06-21
Posts: 4
Location: Dublin,Ireland
Outbound logs in both .log and .xml format.

So weird it reads to me like it is transferring the files successfully, but cannot see them on the FTP site.

Wondering if its maybe a permissions issue.
winscp_outbound.zip (590 Bytes) [Download]

Description: (none)

winscp_outbound.log (13.45 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
What exactly, do you do to "see them on the FTP site"?

Do you have the logs from Windows 7?
Furyio
[View user's profile]

Joined: 2016-06-21
Posts: 4
Location: Dublin,Ireland
I have a Winscp UI open on another machine, where I'm looking at the FTP server itself.

So for the GET command, I can see files being retrieved from the FTP location, and being placed onto a location folder.
For the PUT command, I cannot see files being placed onto the FTP location.


I've looked into my W7 test I had, and realised that its probably not relevant. I had run these commands using a RaspberryPi as a FTP, to test the theory and commands. So while that worked, its not the FTP location I'll actually be using.

I've changed my W7 tasks to reflect the correct FTP location, and same issue is occurring. Logs for that attached.
winscp_outbound.zip (4.36 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
OK, so I need to see the script log file for text with the ls command (the same as you have posted already). And a log file from the GUI, showing how you refresh the remote directory immediately after the scripted upload.
Guest




Attached are the GUI logs.
I've also provided a screenshot showing the "changed" date on the UI, showing right now. I ran the PUT task and saw the date change on the interface, but again no files showing.


Can you expand on the request below?
Quote:
so I need to see the script log file for text with the ls command
WinscpGUI.zip (3.22 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Sorry, it should have been "test", not "text".
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