Copy one file from a server to a local folder

Hi,

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'

Thanks.

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.

Edit:
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.

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.

No problem :wink:
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.

Remove the -r