User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Existing Scripts section within the Web Development category of DaniWeb, a massive community of 374,166 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,281 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Existing Scripts advertiser:
Views: 745 | Replies: 1
Reply
Join Date: Jan 2008
Posts: 2
Reputation: mjgelinas is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mjgelinas mjgelinas is offline Offline
Newbie Poster

Directory Download Script

  #1  
Jan 11th, 2008
Hello,

Wondering if anyone knows of a certain script / solution...

I need a script that will download all the files from an FTP server recursively to the local machine and delete the files and folders from the FTP server after it downloads each one. This script will run every 15 minutes via cron.

Originally I was going to use wget to get the directory tree that I need but as far as I see it does not delete files from the server after downloading them. (it does delete files locally after downloading them with --delete-after)

The script will be running on a Mac with OS X 10.2 so anything unix based should work.

I would really appreciate some help as I am currently at a loss. I only know basic shell scripting myself

Thanks.
Marcel
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2008
Posts: 2
Reputation: mjgelinas is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mjgelinas mjgelinas is offline Offline
Newbie Poster

Re: Directory Download Script

  #2  
Jan 11th, 2008
I built ncftp on my system and it works great for doing this.

Just add this to the crontab:

ncftpget -u [user] -p [password] -R -DD [host] [local dir] [remote files]

Thanks
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Existing Scripts Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Existing Scripts Forum

All times are GMT -4. The time now is 4:08 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC