Click to See Complete Forum and Search --> : ftp batch file
pmetal
May 29th, 2001, 02:34 PM
I'm wondering if it is possible to create a simple batch file on NT that would ftp to a server, logon, put a file, and logoff. I would then want to have it run automatically every evening. Any ideas would be appreciated.
(mods, if this is not the right forum, please move it and let me know.....thanks)
peace
drewber
May 29th, 2001, 03:14 PM
hmmm not sure if it will work but you could try
ftp <<ftp.dat
where ftp.dat looks like
open <site name or ip address>
user <login name>
pass <password>
cwd etc
cwd <where you want the file to go>
bin <~ you should know what this does
put Filename.ext
then just use the at command to fun ftp <<ftp.dat at the specified time
pmetal
May 29th, 2001, 07:28 PM
drewber,
thanks, but it didn't work. the problem is, that once it connects to the server, the batch file no longer has control, and i have to manually put in my logon info. i'm starting to seriously doubt this is even possible. probably a good thing, security wise, but it would be nice to be able to do it. thanks again for the post.
any more ideas?
peace
pmetal
May 29th, 2001, 07:48 PM
for those that are interested, i figured it out. i created a batch file with the following line in it:
ftp -s:filename ip address
filename = a simple text file with commands i wanted issued, including ID and Password, then Put, etc...
it's amazing what one can do when they read the help files :D :D
see ya
ShadowKing
May 29th, 2001, 07:51 PM
Thanks for posting the solution. That way it helps everyone.
:cool:
pmetal
May 29th, 2001, 07:59 PM
No prob, Shadow
that's why we're all here. i learn a lot just from reading all the posts, and it's a little annoying when someone finds the solution and doesn't bother to tell the rest of the class. ya know?
anywho, i hope it helped somebody
take care
:D