How to copy files from remote server to local? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

How to copy files from remote server to local?

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-21-2013
parpaa parpaa is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 15 November 2013, 10:31 AM EST
Posts: 32
Thanks: 12
Thanked 1 Time in 1 Post
How to copy files from remote server to local?

Hi experts,

I 'm newbie to unix world, now I have task to copy the latest files from remote server to my local. I believe this must be very common request in this community. I want you do it one more time for me please.
My requirement is something like this:

I receive files in the below format

ABC_XCompany_report_201205.txt
XXY_XCompany_report_201206.txt
DEF_XCompany_report_201207.txt

Now I need to copy the latest file to my local. I receive these files on monthly basis. So I need to create new folder before copying these files. The name of these new folder should be from the time stamp of the file, we receive them.

I'd tried with below script- but with little success!

Code:
option batch continue
option confirm off
open mysession

lcd c:\destination_folder
get /archive/data/folder1/*report*.txt|tail -1 |xargs -i c:\destination_folder\

close
exit

Hope this makes sense.
Thank you so much for taking time!

Last edited by parpaa; 07-21-2013 at 06:56 AM..
Sponsored Links
    #2  
Old 07-21-2013
vinil vinil is offline
Registered User
 
Join Date: Dec 2012
Last Activity: 28 July 2014, 9:32 AM EDT
Posts: 40
Thanks: 1
Thanked 1 Time in 1 Post
Do the folloiwng
sftp-->get

Definitions as below :
SFTP Secure file transfer program.
get[flag][local path]
Sponsored Links
    #3  
Old 07-21-2013
parpaa parpaa is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 15 November 2013, 10:31 AM EST
Posts: 32
Thanks: 12
Thanked 1 Time in 1 Post
How to copy files from remote server to local?

I am not sure if you have understood my complete requirement here?
    #4  
Old 07-21-2013
RudiC RudiC is offline Forum Advisor  
Registered User
 
Join Date: Jul 2012
Last Activity: 25 October 2014, 1:16 PM EDT
Location: Aachen, Germany
Posts: 4,427
Thanks: 73
Thanked 1,084 Times in 1,022 Posts
Quote:
Originally Posted by parpaa View Post
. . . I believe this must be very common request in this community. I want you do it one more time for me please . . .
You are right, it has been discussed umpteen times. Why don't you take the time, search theses forums, and adapt the solutions found? We're glad to help with problems, then.

Quote:
I am not sure if you have understood my complete requirement here?
I'm not sure you have understood the forum rules?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
compare zip files from a local to remote server alexcol UNIX for Dummies Questions & Answers 4 01-03-2012 07:29 PM
Commands to copy a tar.gz file from a Remote Unix Server to Local Desktop. marconi UNIX for Advanced & Expert Users 3 08-28-2008 02:06 AM
Copying files from a remote server to local system with cygwin patwa UNIX for Dummies Questions & Answers 3 06-12-2008 07:49 AM
FTP multiple files from remote server to local server berlin_germany Shell Programming and Scripting 2 12-20-2006 02:24 AM
how to copy files from local computer to server sagolo UNIX for Dummies Questions & Answers 3 10-12-2005 10:02 AM



All times are GMT -4. The time now is 03:44 AM.