LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File Transmission through FTP to Destination (http://www.linuxquestions.org/questions/linux-newbie-8/file-transmission-through-ftp-to-destination-890756/)

barani_pd 07-09-2011 06:33 AM

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:
08072011IE01CTYHUB.pdf
08072011IE01CTYSMG.pdf
08072011IEdavanamCTYHUB.pdf
08072011IEversaVANSMG.tif
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.

Wim Sturkenboom 07-09-2011 06:58 AM

Have a look at lftp; it's a ftp client with scripting options


All times are GMT -5. The time now is 02:08 PM.