Copy one file from a server to a local folder

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Copy one file from a server to a local folder
# 1  
Old 08-05-2014
Copy one file from a server to a local folder


Is there a way I can copy a file from a server to a local folder (i.e. My Documents)? can it be done by scp?

I tried this but it just rename the file as the folder it has to be transferred at.

scp -r name@some_server:/home/user/file.txt 'somehere\home\home_dir'


Last edited by erin00; 08-06-2014 at 12:49 AM..
# 2  
Old 08-06-2014
Hi mate, there are many ways to perform that task. Yes, it can be done by scp.
For the sake of simplicity I suggest to SFTP through FileZilla or scp through WinSCP.

Hope this helps.

Ok, you edited your post, I've thought you want to copy *from* UNIX/Linux *to* Windows...
Please tell us what you want to do exactly.
# 3  
Old 08-06-2014
well, I have this script that produces some kind of list, after generating the list as .csv file, I want this file to be available at my windows home directory. So before exiting the script I want the script to scp the generated file to my windows home directory. Apologies if I was being vague.
# 4  
Old 08-06-2014
No problem Smilie
All right, basically you want to "upload" from Linux *to* Windows, right?
For this task one needs a SSH daemon/service running on the Windows machine.
The configuration is not that trivial and I have no experience in setting this up,
but you could google for "cygwin sshd" and/or "sshd for windows".
An alternative way would be to install a FTP daemon/service on Windows and try it that way.
# 5  
Old 08-06-2014
Remove the -r
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copy files from Linux server local windows machine using a shell script

Hello, I need to create a shell script which will copy files - which are created on particular date and starting with particular name - to local windows XP machine. Is this possible.? Currently it is being done manually using winscp (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies

2. UNIX for Dummies Questions & Answers

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... (3 Replies)
Discussion started by: parpaa
3 Replies

3. Shell Programming and Scripting

Copy folder and files from unix server to linux server

We would be migrating unix solaries to Linux redhat. Basically source is unix and target is linux. i would like to copy entire file system unix/source/* to target linux/souce/* but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Discussion started by: balajikalai
8 Replies

4. UNIX and Linux Applications

Need to copy the latest file from Unix server to Shared folder

Hi All, One job in unix server will generate .csv files daily. I need to copy the latest of these .csv file from the unix server to the shared drive/folder in windows through unix script. My shared folder will look something like W:\some folder(for example). Could any one of you please help... (3 Replies)
Discussion started by: jaya@123
3 Replies

5. UNIX for Advanced & Expert Users

How to copy folder from one server to remote one using SSH

ok guys. I have a Centos server running a large website I own. Its is severely struggling under the load and I am having to move to a new load balanced setup. The servers are both remote (to me) and although I can do most things admin wise in nix, I am struggling a bit to come up with a way... (1 Reply)
Discussion started by: anderow
1 Replies

6. Shell Programming and Scripting

how to FTP a file from the local folder to unix server

Hi All, please help me to write a shell that ftp a file which is in the local (C:\) drive to a Unix server. Where as i know the IP for the Unix server. i could do this process by using ftp command. pls help me to write as Shell script. Thanks in advance for all of your answers.:b::b: (3 Replies)
Discussion started by: little_wonder
3 Replies

7. UNIX for Dummies Questions & Answers

Copy file from local machine to server?

I am logged into a server via SSH. There is a file on my desktop of my Windows PC I would like to put on that server. How do I do it? SCP looks the likely method but how does the server know where the file is on the local machine? Thanks. (2 Replies)
Discussion started by: Sepia
2 Replies

8. UNIX for Advanced & Expert Users

Commands to copy a tar.gz file from a Remote Unix Server to Local Desktop.

Hi, Just wanted to know, how can I ftp/transfer/copy a (design.tar.gz) archive from a Unix Server ( which is at a remote location, to my Windows Desktop. Obviously, it is not possible at cmd prompt on my Windows using the following commands :- ftp... (3 Replies)
Discussion started by: marconi
3 Replies

9. UNIX for Dummies Questions & Answers

copy folder from one server to another

Dear ALL I have two Sco Unix ver 5.0.5 servers and i want to copy one folder from server A (IP to server B(IP I want a script file using maybe "ftp" to do the job Kindly any help (11 Replies)
Discussion started by: sak900354
11 Replies

10. UNIX for Dummies Questions & Answers

how to copy files from local computer to server

hi, im a newbie using unix. My local computer OS is Windows XP while server is using Unix. May i know how to transfer file from local computer to server? i do not know the commands. Thanks. :) (3 Replies)
Discussion started by: sagolo
3 Replies
Login or Register to Ask a Question

Featured Tech Videos