Script issue

Advertisement

carbon78
Joined:
Posts:
1
Location:
CA

Script issue

Totally new to this...
I have been testing a script on a windows pC. However, once i set up the script on a windows 2008 r2 server it bugs out...

Here is my script, called upload.txt

option batch abort
option confirm off

open sftp://user:password@user.sftp.site.com/ -hostkey="ssh-rsa 2047 xxxxxxxxxxxxxxxxxxxxx
"

lcd D:\RACKSPACE\PUSH\commercehub\

cd /incoming/inventory/dsg

put *.inventory


exit

Here si the bat file

"C:\Program Files (x86)\WinSCP\winscp.com" /ini=nul /script=C:\Users\administrator\Desktop\batch\script\uploadt.txt

ForFiles /p D:\RACKSPACE\PUSH\commercehub\ /d -3 /c "cmd /c del *.inventory"

pause

This script works on windows 10 pc, but not on windows 2008 R2. I am also seeing this

Ambiguous command ''. Possible matches are: !, ascii, binary, bye, call, cd, che
cksum, chmod, close, cp, dir, echo, exit, get, help, keepuptodate, lcd, lls, ln,
lpwd, ls, man, mget, mkdir, mput, mv, open, option, put, pwd, recv, rename, rm,
rmdir, send, session, stat, symlink, synchronize

Not sure why.

Any input will be appreciated.


Thanks,

Dave

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,846
Location:
Prague, Czechia

Re: Script issue

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum