LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2008, 02:11 PM   #1
tostay2003
Member
 
Registered: Jun 2006
Posts: 126

Rep: Reputation: 15
ftp directory


I have to write a script on ServerA in which I need to copy the directories/files from ServerB (all files under sub-directories as well).

Code:
ServerA

DirectoryA/SubDirectory1
           SubDirectory2
           SubDirectory3


ServerB

DirectoryB/SubDirectory1
           SubDirectory2
           SubDirectory3
DirectoryA is not equal to DirectoryB

But the respective sub-directory names are same.

How Can I write my script using ftp.
 
Old 01-16-2008, 04:27 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
I would install ncftp if you don't already have it. It has non-interactive command line versions ncftpget/ncftpput that can get and put entire directory trees with the -R option.

http://www.ncftp.com/ncftp/
 
Old 01-17-2008, 07:22 AM   #3
tostay2003
Member
 
Registered: Jun 2006
Posts: 126

Original Poster
Rep: Reputation: 15
Thanks for the help. I don't have ncftp and don't have possibility of installing it. How can I obtain the same with ftp?
 
Old 01-17-2008, 08:50 AM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Have scp? That would be even better.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Directory For FTP mohd anas Linux - Networking 1 11-08-2006 06:46 AM
control the ftp directory sunhui Linux - Software 1 09-14-2006 09:20 PM
how to get a whole directory through ftp? fssengg Linux - Newbie 2 08-25-2005 11:13 AM
is there the x directory in an ftp server? kpachopoulos Programming 1 07-24-2005 03:44 PM
Automatically Copying files from the ftp directory into the html directory swatward Linux - General 3 04-17-2005 10:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration