Topic "Batch Console is empty during copy"

Author Message
SAM
[View user's profile]

Joined: 2007-10-26
Posts: 2
Hello,

I created a winscp-script that I start from ant to copy some things to my server. But I cannot see the transfer progress. The console window comes up but its empty.

Is there a way to show the progress in console window?

Thank you

SAM

# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on

# Disable overwrite confirmations that conflict with the previous
option confirm off
option echo on

# Connect
open user@myserver.com

# Change remote directory
cd /upload

# Force binary mode transfer
option transfer binary

# Upload the file to current working directory
put c:\dir\current\*

#Disconnect
close

# Exit WinSCP
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
What version of WinSCP are you using? Do you run winscp.com or winscp.exe? How do you run it?
_________________
Martin Prikryl
SAM
[View user's profile]

Joined: 2007-10-26
Posts: 2
Im using WinSCP Version 4.03 (Build 345)

Im starting WinSCP within an ANT-Script. Here is the ANT-Target:

...
<target name="WinSCP upload" depends="nsis">
<exec executable="${winscp.exe}" failonerror="true" output="winscp_out.txt" >
<arg line="/console /script=winscp/upload_file.txt"/>
</exec>
</target>
...

This results in following call
winscp.exe /console /script=winscp/upload_file.txt

Thank you for the help,

SAM
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
So the output is probably redirected to winscp_out.txt, isn't it?
_________________
Martin Prikryl
Guest




No, the winscp_out.txt file is empty.

Nothing to see in console also if I remove the output attribute from
<exec executable="${winscp.exe}" failonerror="true" output="winscp_out.txt" >

Thank you for the help,

SAM
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Do you see any output if you run the same command manually?
_________________
Martin Prikryl
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