Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


Closed Thread
  Search this Thread
Old 03-08-2009, 10:14 PM   #1
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 ?


Last edited by Tinkster; 03-15-2009 at 07:13 PM. Reason: [restore original post]
Old 03-09-2009, 02:56 PM   #2
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.


Last edited by Tinkster; 03-15-2009 at 08:58 PM. Reason: irrelevant link removed
Old 03-15-2009, 07:13 PM   #3
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 12:09 PM
.csv file upoload, manipulation, download script help donv2 Programming 6 12-19-2007 04:20 PM
Script to download file using wget linuxnewbie82 Programming 6 02-14-2007 05:48 AM
Perl Script to download file apt Programming 4 10-19-2005 09:33 AM
How to write a shell script to download a file via FTP? guarriman Linux - General 4 12-21-2004 10:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:31 AM.

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