Unknown command '_o'

Advertisement

raimiansch
Joined:
Posts:
2

Unknown command '_o'

Hello together!

I want to automate file trasfer with winscp. But I always get the error
Unknown command '_o'

I use following command:

.\WinSCP.com /script=scp.txt

The content of scp.txt is:
option batch on
option confirm off
open nabackup@x9149.spar.local.at
bin
put C:\adm\VMbackup\VMware-ESX-aecpitsp01
put C:\adm\VMbackup\VMware-ESX-atsl-dmgr01
put C:\adm\VMbackup\VMware-ESX-atsl-ecpa02
exit

The output is:
C:\Program Files (x86)\WinSCP> .\WinSCP.com /script=scp.txt
Unknown command '_o'.
winscp>

When I open the winscp console (winscp.com) and try each command per hand, it works very fine.

I use the version
C:\Program Files (x86)\WinSCP>WinSCP.com /h
WinSCP, Version 4.3.2 (Build 1201)
Copyright (c) 2000-2011 Martin Prikryl

Can anybody help me please?

Thanks
Rainer

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,252
Location:
Prague, Czechia

Re: Unknown command '_o'

Make sure the script file is saved using UTF8 encoding.
_________________
Martin Prikryl

Reply with quote

raimiansch
Joined:
Posts:
2

Re: Unknown command '_o'

martin wrote:

Make sure the script file is saved using UTF8 encoding.

Thank you for your help.

I used within powershell following code to create the text file.

echo "option batch on" >>scpcmd
echo "option confirm off" >>scpcmd
echo "open nabackup@x9149.spar.local.at" >>scpcmd
..


Now I use set-content instead of ">>scpcmd" and it works fine.

Thank you
Rainer

Reply with quote

Advertisement

You can post new topics in this forum