Home » Infrastructure » Unix » FTP filename and date
FTP filename and date [message #98479] Fri, 19 November 2004 12:52 Go to next message
Pinki
Messages: 5
Registered: September 2004
Junior Member
The file will be produced on the ftp server(source server) once a month (what day is unknown).

Filename format and filedates on the source server for the month of may:

------------------------------------------------------------------------------------------------------

20010505_files.txt ---- File modified date on ftp server is May 05, 2001

Filename format and filedates on the source server for the month of June:

--------------------------------------------------------------------------------------------------------

20010612_files.TXT ---- File modified date on ftp server is June 13, 2001

Get the latest filename on the ftp source server everyday to a variable in the script file. Here the file 20041011_file.txt will be on an ftp server(source server) which should be ftped to a local server (destination server).

(Notice the filename extensions txt and TXT also).

I would like to ftp the file from source to destination server irrespective of the extension and the datepart before the underscore, checking everyday on the ftp server and ftp it to the destination the latest file everyday. I have a problem since the datepart in the filename differs and the extension also varies. I would also like to save the filename to a variable in the korn shell script.
Re: FTP filename and date [message #98505 is a reply to message #98479] Mon, 06 December 2004 11:11 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
See this for some ideas:
http://www.ieb.com/Article/FileTran.htm
Previous Topic: I/O wait on IBM FastT900 with oracle 8i
Next Topic: Unix Query
Goto Forum:
  


Current Time: Tue Nov 26 02:08:52 CST 2024