syskarthik
08-08-2005, 10:26 AM
Hi all,
I am trying to have shell script - having need to download some files from a remote server. The only access to the remote server we have is sftp.
The script needs to dynamically get the new files from the server and get download.
Code i am trying to use :
----------------------------------------
sftp -b batchfile test@x.x.x.x
where in batchfile :
ls > somefile
get *.*
-----------------------------------------
here the line : "ls > somefile " doesn't seem to work putting list of files to "somefile" - giving the error :
Couldn't stat remote file: No such file or directory
Please advise the same thing can be done in any other possible way.
Thanks in advance,
karthik.k
I am trying to have shell script - having need to download some files from a remote server. The only access to the remote server we have is sftp.
The script needs to dynamically get the new files from the server and get download.
Code i am trying to use :
----------------------------------------
sftp -b batchfile test@x.x.x.x
where in batchfile :
ls > somefile
get *.*
-----------------------------------------
here the line : "ls > somefile " doesn't seem to work putting list of files to "somefile" - giving the error :
Couldn't stat remote file: No such file or directory
Please advise the same thing can be done in any other possible way.
Thanks in advance,
karthik.k
