| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
Dos Batch file for Dos FTP
|
Original Message
|
Name: Mike Bridges
Date: January 19, 1999 at 18:25:24 Pacific
Subject: Dos Batch file for Dos FTP
|
Comment: Trying to write batch file and pass varible (file name) for transfer, also to set either in command line or as environment varible.
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: SaGS
Date: January 25, 1999 at 08:30:14 Pacific
|
Reply: (edit)Grately depends on the FTP client you use. I know only about the FTP.EXE that comes with Windows 95 (and gets copied to your WINDOWS\ folder when you install the TCP/IP protocol). This one has a "-s:filename" switch that directs it to read all commands from the specified text file and not from the keyboard. "FTP -?" (not "FTP /?") for help. Within a batch, you can build such a response file on-the-fly with "echo" commands - use %1..%9 batch parameters to specify host/file/etc -, execute FTP, then delete the file (needed no more). Basically, the file will look like this:
open (site name here - ftp.somewere.com) (user name here, usually anonymous) (password here, usually your email addr) binary get (remote path+filename to get here) close quit
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: paul
Date: September 14, 2000 at 14:04:09 Pacific
|
Reply: (edit)I try to use the code you provided on your message, but open (site name here - ftp.somewere.com) (user name here, usually anonymous) (password here, usually your email addr) didn't work. Then I try to use the following command line to do ftp, but it seems my FTP client doesn't have password or pass command available. What can I do? Thanks. ftp -s:c:/ftp.txt **.**.***.** the following is the content of ftp.txt user xduan pwd ****** binary get c:/webs/***.inf close quit
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: Scott
Date: October 5, 2000 at 10:37:53 Pacific
|
Reply: (edit)Paul, I am assuming that the **.**.***.** that you have above isa the IP address that you are trying to connect to. Well, that IP should be in the first line of the ftp.txt file. Ex of ftp.txt open 192.168.32.65 anonymous sam@someplace.com bin cd /pub get something.txt bye then you would simply use ftp -s:ftp.txt as the command
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: randy veraldo
Date: October 23, 2000 at 11:43:48 Pacific
|
Reply: (edit)I am having a problem using 'put'. I am trying to 'put' a file on the target server. I can get the connection to happen through the script file but can only put the file in the root directory of the target machine. It is obviously not understanding the mapping.
Report Offensive Follow Up For Removal
|
|
Response Number 5
|
Name: Michael Necklen
Date: December 20, 2000 at 08:22:51 Pacific
|
Reply: (edit)Hello if anybody out there has some insight on this one I would be grateful. I have a batch that calls ftp.exe -s:filename and in the filename are more file names that are date based in other words seMMDDse this type of format is there any way to get the MMDD section of the file to automatically change after it has been executed for that specific day? Thanks in advance.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Disk Operating System Forum Home