Computing.Net > Forums > Programming > Help with a Batch file script (FTP)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to get for your free account now!

Help with a Batch file script (FTP)

Reply to Message Icon

Name: Mariusk
Date: July 31, 2008 at 13:37:06 Pacific
OS: Vista Ultimate x64
CPU/Ram: 2.40 GHZ DUO/2 GB
Comment:

Well, I'm sitting here and can't this to work right.
Here's what I want to do:
- Login to a ftp server
- Download qconsole.log from demott
- Upload the same file to another folder at the remote server. (/logs)

Then the next thing:

I want then to upload this file from /logs to another FTP server, could anyone give me an example how to do that? Anyway here's my code:

Script.bat

FTP.EXE -s:SCRIPT.TXT


Script.txt:

open **.***.**.*** (IP)
******** (USERNAME)
******** (PASSWORD)
lcd c:\logs
quote PASV
cd /demott
quote PASV
get qconsole.log
cd /demott/logs
quote PASV
put qconsole.log


Report Offensive Message For Removal

Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 31, 2008 at 18:37:39 Pacific
Reply:

@echo off
setlocal enabledelayedexpansion

> s.ftp echo o ftp.nai.com
>> s.ftp echo anonymous
>> s.ftp echo anonymous
>> s.ftp echo cd demott
>> s.ftp echo get qconsole.log
>> s.ftp echo cd /logs
>> s.ftp echo put qconsole.log
>> s.ftp echo bye

ftp -s:s.ftp


=====================================
If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Help with a Batch file script (FTP)

Help creating a Batch file urgent www.computing.net/answers/programming/help-creating-a-batch-file-urgent/15963.html

Need help with a batch file www.computing.net/answers/programming/need-help-with-a-batch-file/17269.html

need a batch file www.computing.net/answers/programming/need-a-batch-file/13744.html