LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 03-08-2009, 09:14 PM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
download file script


I have a unix server and use ftp client to connect the ftp server
that provided from remote server ( only ftp is allowed ) , in
remote server there have many .txt and .doc files ( in pairs ) ,
can advise if I want to have a script to do that if the .doc exists
then download the corresponding .txt , for example , if aaa.doc
exists in remote server then download aaa.txt, if bbb.doc exists
then download bbb.txt and so on , can advise how to do it ?


aaa.txt
aaa.doc
bbb.txt
bbb.doc
ccc.txt
ccc.doc

Last edited by Tinkster; 03-15-2009 at 06:13 PM. Reason: [restore original post]
 
Old 03-09-2009, 01:56 PM   #2
sureshsujatha
Member
 
Registered: Mar 2009
Posts: 40

Rep: Reputation: 15
write a shell script that analyses the list of files on the server (the dir command will give you the list of files on the server) - and then pull the files you want using the mget command.

Simple!

Last edited by Tinkster; 03-15-2009 at 07:58 PM. Reason: irrelevant link removed
 
Old 03-15-2009, 06:13 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Ust, I've taken the liberty to restore the initial question,
and ask you *not* to go and butcher threads any more ...
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem to download a file via a script redvivi Linux - Newbie 1 08-07-2008 11:09 AM
.csv file upoload, manipulation, download script help donv2 Programming 6 12-19-2007 03:20 PM
Script to download file using wget linuxnewbie82 Programming 6 02-14-2007 04:48 AM
Perl Script to download file apt Programming 4 10-19-2005 08:33 AM
How to write a shell script to download a file via FTP? guarriman Linux - General 4 12-21-2004 09:31 AM


All times are GMT -5. The time now is 09:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration