Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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!


  Search this Thread
Old 07-09-2011, 06:33 AM   #1
LQ Newbie
Registered: Sep 2009
Location: Bangalore, India
Distribution: RHEL, Fedora, Ubuntu
Posts: 21
Blog Entries: 1

Rep: Reputation: 0
Lightbulb File Transmission through FTP to Destination

We used to send files in the form of .jpg, .tif, and/or .pdf. Normally the file name will be in the form of 08072011IE01CTYHUB.PDF (DDMMYYYY - is the date, IE - publication, 01 - page number, CTY - edition name and HUB - destination in three characters). These files will be stored in a common folder (say SOURCE). I need a script to move these files to destination by reading the destination from the file name through FTP. At destination these files should be moved to a folder meant for CTY. Please note before the file is sent through FTP it should be compressed (zipped)

At SOURCE folder the files will be as:
etc. where first 8 characters are date in the form of DDMMYYYY, next 2 characters are publication, last 3 characters are destination, previous 3 characters are edition and left over in the middle are page number in the form of NN or name.

Presently I am zipping these files and send it through FTP to the destination. At destination my counterpart takes the file, stores in appropriate location (like folder name CTY) for use.

To automate the above process, I want a script.

Will you please suggest?

Thanks in advance.
Old 07-09-2011, 06:58 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Have a look at lftp; it's a ftp client with scripting options


filename, ftp, transfer, transmission, zip

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
Copy certain file types recursively while maintaining file structure on destination? rockf1bull Linux - Newbie 1 06-14-2011 09:28 AM
copy the file whose source path is mentioned in a file to the specified Destination bluepenguine Linux - General 1 06-03-2010 05:31 AM
destination unavailable W/ vpn. All other net destination o.k. MikeOfAustin Linux - Networking 1 04-07-2007 04:42 PM
How to record a television transmission from realplayer chinese TV file miguipda Linux - Software 5 01-19-2005 01:12 PM
How do I redirect something to a file without it overwriting the destination file??? nikold01 Linux - General 8 09-09-2004 02:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:01 PM.

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