Get the most recent file in a remote server using FTP script



Hi,
I have a few files with a timestamp appended in the end ,in a remote
server,I need to get the most recent one in the ftp scripot.But Iam
unable to do it using :


MOST_RECENT_FILE1=`ls -1t ${FTP_OUTPUT_DIR}${FTP_OUTPUT_FILE1}* | head
-1 `
get ${MOST_RECENT_FILE1} ${FTP_INPUT_DIR}${FTP_INPUT_FILE1}.csv

it says,file not found.
Can anyone help me on this?
thanks

.



Relevant Pages

  • timestamp changes when I ftp a file to server
    ... of the upload the timestamp of the file advances to exactly 5 hours from the ... I've confirmed that the server has the correct current time and date. ... So does the remote pc. ... I've tried it from different pc's, different ftp clients, different versions ...
    (freebsd-questions)
  • Re: Unknown Network Attack
    ... But not routing and remote access (RRAS). ... I enabled the Windows Firewall and poked holes for HTTP, FTP, ... >> on the FTP service just fine using Internet Explorer's FTP service, ...
    (microsoft.public.windows.server.networking)
  • FTP skipping commands in AIX
    ... remote server. ... Our server is using the native FTP in AIX 5.1 and the ...
    (comp.unix.aix)
  • Re: variable question
    ... When using FTP I have found that if a transfer fails part way into the ... transfer then you end up with an incomplete file on the remote system. ... EXITONERROR before your DEL command so it won't exit if the file doesn't ... !setvar remotefile ' ' ...
    (comp.sys.hp.mpe)
  • RE: FTP Upload
    ... FTP server to the following specified size. ... //set or get the remote path of the FTP server that you want to connect. ... //set the class MessageString. ...
    (microsoft.public.dotnet.framework.aspnet)