Topic "Commandline Output of Winscp session - filename"

Author Message
Deva

Guest


Hello,
I am trying to get the output of the winscp session into a file so that after i see each transfer as 100 % percent completed to go ahead and delete the file.

This is my batch
WinSCP.com /script=SFTPScript.txt /log=log.txt > SessionLog.txt

And it works perfectly ..... only issue is the output. The files transfer fully, they don't have the filename limit issues, but the output doesnt give the full name. The name gets truncated. And when the script next goes to look at the file and delete the 100% transferred files. It says file not found. Which is correct. Is there a way to over come this limitation?

Eg: of a full filename that gets transferred correctly- put ClickBotLog_20081119_130145.zip

batch on
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "noname".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] noname@10.1.1.1.
/ServerLogs/mail_logs/MS/MS09/Staging/
D:\PRODUCTION\MS09\logs\archive
ClickBotLog_20080911_2121 | 0 kB | 1.2 kB/s | binary | 100%
ClickBotLog_20080916_1722 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20080922_1608 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20080923_2137 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20080926_1540 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081002_0758 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081003_1340 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081003_2147 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081008_1718 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081009_2147 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081012_0709 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081016_1325 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081017_1640 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081023_0903 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081025_0930 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081029_1710 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081031_1630 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081106_0724 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081106_2253 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081106_2323 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081110_1820 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081114_1012 | 0 kB | 1.1 kB/s | binary | 100%
ClickBotLog_20081116_0925 | 0 kB | 1.2 kB/s | binary | 100%
Session 'noname@10.1.1.1.' closed.
No session.


Any help regarding the same is appreciated....

Thanks
Advertisements
Deva

Guest


Sorry -
I am using windows 2003 SP1 Server- latest version of winscp.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
WinSCP truncates the filename only when output is printed on console. When redirected to file, full filename is used:

Quote:
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "xxxx".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] xxxx@xxxx
ClickBotLog_20081119_130145.zip | 1547 KiB | 1568.1 KiB/s | binary | 100%


Was the output you have posted copied indeed from the output file or from the console window?

Anyway, you should better use XML logging.
Deva

Guest


The output was from the file SessionLog.TxT..... I just assumed that whatever was put on the console was pushed to the file .. which was what is happening in my case...not sure why

"WinSCP.com /script=SFTPScript.txt /log=log.txt > SessionLog.txt "

Was this the command you used for the redirection .. maybe how I am redirecting is not correct ....


I will try xml logging ...

Thanks For you input...
Deva

Guest


The issue has been resolved.

Reinstalling the Winscp program resolved it...

Thanks for your Help!!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Deva wrote:
Reinstalling the Winscp program resolved it...

You may had have old version of winscp.com.
_________________
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