Topic "Newbie needs help with Batch file"

Author Message
[View user's profile]

Joined: 2014-09-16
Posts: 8
Location: CA
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 /script="Y\sql\Finance\test.txt" /log="Y\sql\Finance\testlog.txt"


# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open ftp://<<username>>:<<password>> -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
# Exit WinSCP
[View user's profile]

Joined: 2014-09-16
Posts: 8
Location: CA
Figured it out. I had left out the : after the drive letter Y. Duh, consider this resolved!!! Smile Very Happy /script="Y:\sql\Finance\test.txt" /log="Y:\sql\Finance\testlog.txt"
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24736
Location: Prague, Czechia
Btw, the certificate fingerprint format does look suspicious (the leading bb4).
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License