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: Newbie needs help with Batch file

Btw, the certificate fingerprint format does look suspicious (the leading bb4).
nimmis

Figured it out. I had left out the : after the drive letter Y. Duh, consider this resolved!!! :-) :D
winscp.com /script="Y:\sql\Finance\test.txt" /log="Y:\sql\Finance\testlog.txt"
nimmis

Newbie needs help with Batch file

I managed to create a script to connect to an FTP server on a different port. When I run it from the dos command prompt-it works. To automate it-created this batch file. Now it does not work. No log file is created. Can someone help me-what am I doing wrong? Thank you much in advance

Batch file
===========
cd /d C:\Program Files (x86)\WinSCP
winscp.com /script="Y\sql\Finance\test.txt" /log="Y\sql\Finance\testlog.txt"
exit
CMD

Script:
========

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open ftp://<<username>>:<<password>>@xyz.celink.com:31110/ -explicittls -certificate="bb4:b4:0a:6f:4f:be:6f:0c:43:e9:52:e8:e8:3c:92:56:ce:03:7b:5b"
# Change remote directory
cd /UrbanFinancial/Extracts/daily
# Download file to the local directory
get "Daily UPB Split Report - Urban-en-us.xlsx" Y:\sql\finance\DailyUPB.xlsx
# Disconnect
close
# Exit WinSCP
exit