Chandrahas Balleda
Chandrahas Balleda

Reputation: 2822

FTP File Transfer using Batch Script

I am trying to transfer multiple files through FTP from a local directory - C:\Users\Documents\FTP\*.* to the Domain.

I've approached like the below.

First I've created a batch script DISCH.BAT as below ::

open ftp://[email protected]/outbound/Pre/Release/ 
USERNAME 
PASSWORD 
binary
mput C:\Users\Documents\FTP\*.*
quit

I've created another batch file RUN.BAT as below :

ftp -i -s:C:\Users\Desktop\DISCH.bat

When I am running the RUN.BAT ie., the second one, nothing is happening. Can you please advice where I am going wrong.

Thanks in advance.

Upvotes: 1

Views: 11041

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202088

The argument to open is not URL, but only a hostname:

open XXX.XXXXXX.net

To enter the desired folder, use cd command after the credentials:

cd /outbound/Pre/Release/ 

Upvotes: 1

Related Questions