# Terminal FTP Question



## Sogni (Nov 30, 2002)

I think I migh have had a very long week this weekend... 

Problem:
Can someone tell me; how can I upload a directory with its contents and sub-directories via FTP using the Terminal?

Why?:
Eventually I want to create a script that will automatically do this overnight to upload reports for a client to view on a website (being grabbed from another computer).

Thanks for any help. 
(I'm not a newbie, but my brain is malfunctioning tonight! lol )


----------



## gumse (Dec 1, 2002)

I think there is info in an older thread, do a search for curl and you will find what you need to know about scripted uploading.


----------



## UtaTr3y (Dec 2, 2002)

On my SuSE Linux box, I simply use the command "ftp", type "man ftp" for usage.


----------



## Sogni (Dec 2, 2002)

Hmmm... Maybe I didn't explain myself clearly?
So much for trying to keep my messages short!  

I am using the "ftp" program from the terminal (the Linux/UNIX-type command line located in /Applications/Utilities),

Now, using this "ftp", I am trying to upload a directory to a remote server... I would need to do this on a daily basis...

I think I also mentioned I wasn't a newbie, so the first thing I had done was looked in "man ftp" but didn't find anything to help me...

I do recall being able to do this, but I've been away from Linux for a while that I've forgotten...

I'm trying to avoid mkdir-ing and cd-ing the directories and sub-directories on the remote server.


----------



## anarchie (Dec 2, 2002)

The standard ftp program has no support for recursively uploading directories, save tarballing the directory, uploading the tarball, then decompressing it in place.  Try downloading NcFTP from http://www.ncftp.com/ and examining its included 'ncftpput' companion program.


----------



## Sogni (Dec 2, 2002)

> _Originally posted by anarchie _
> *The standard ftp program has no support for recursively uploading directories
> *



Really? Damn... that sux. 
No wonder I couldn't figure it out! 



> *
> save tarballing the directory, uploading the tarball, then decompressing it in place.
> *



Can that be done from the FTP program?
And does the remote server need to have tar/be a UNIX server (I'm uploading to a Windows server).



> *
> Try downloading NcFTP from http://www.ncftp.com/ and examining its included 'ncftpput' companion program. *



I'll give it a try (it is a shell program from what I've read, right?).

Thanks for the info.


----------

