Advertisement

ftp upload scripts?

Started by November 04, 2004 04:13 PM
3 comments, last by dcosborn 20 years, 2 months ago
I'm trying to write a script that'll upload a tree from my machine to a remote ftp server. So far, i've managed only to find the 'ftp-upload' package in the debian archives. It's not goot enough because it can't tell the difference between files and directories. So, before I grab it's source and hack it to do what I want, does anybody know of a script that will upload a bunch of files and directories to an ftp server?

ncftp has a utility program, ncftpput


ncftpput -u username -p password -R ftp.server.com /pub/files dir1 dir2 dir3 file1 file2



enjoy.

-oddbot
Advertisement
if you want to use the standard ftp.exe that every machine on the planet has, you can do this:

somefile.txt:open servernameuserpasspromptpassiverput [forget syntax - google it or go into ftp command line and type help]byeupload.batftp -s:"somefile.txt"


Dwiel
ncftpput did it.

standard ftp doesn't work with directories.
I wrote a quick script in Python that tarred and gzipped a directory heirarchy before uploading it to FTP. Don't have access to the source code at the moment, but its pretty short. Just use the ftplib and tarfile standard libraries.

This topic is closed to new replies.

Advertisement