Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: help with a script to upload

Why do you use a batch file to create a VB script to create an FTP script? It's over-complicated.

Anyway, for instructions for converting ftp.exe script to WinSCP, see
https://winscp.net/eng/docs/guide_ftp_script_to_sftp
jmedley200

help with a script to upload

currently use a .bat file with win ftp to upload but need to transition the command line script to WinSCP. Any guidance would be greatly appreciated. Here is the current .bat which needs to be transitioned:

*********************************

d:
CD \
CD \apps\Axys3
d:\apps\Axys3\axys32.exe bb_alpha.scr -exit
@echo off

set olddir=%CD%
c:

set TmpFile=%temp%\ftp_tmp.vbs

echo>>%TmpFile% With WScript
echo>>%TmpFile% .Echo "user"
echo>>%TmpFile% .Echo "username"
echo>>%TmpFile% .Echo "password"
echo>>%TmpFile% .Echo "binary"
echo>>%TmpFile% .Echo "prompt no"
echo>>%TmpFile% .Echo "mput D:\apps\Axys3\Bloomberg\bb_alpha.xlsx"
echo>>%TmpFile% .Echo "close"
echo>>%TmpFile% .Echo "quit"
echo>>%TmpFile% End With
cscript //nologo %temp%\ftp_tmp.vbs > %temp%\ftp_tmp.txt
ftp -n -s:%temp%\ftp_tmp.txt 205.216.112.8
del %temp%\ftp_tmp.txt
del %Tmpfile%
set TmpFile=

*********************************

Thanks in advance