Newbie needs help with Batch file

Advertisement

nimmis
Joined:
Posts:
8
Location:
CA

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

Reply with quote

Advertisement

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"

Reply with quote

Advertisement

You can post new topics in this forum