Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am on windows and my server is linux. I would like to grab files from the server automatically with a script. Maybe execute a bash script remotely as well but maybe i dont need that.

I need to connect securely and i would like some kind of password so not anyone can connect. I need to download files and i'd like to get every file in a set of folders. I do not want to download them again if they exist.

What is the easiest way to do this? i thought of creating a simple .NET site with data in App_Data (so it cant be reached from the outside) however i have a feeling an easier way exist. I'd like to do scp with a shell but i am on windows and also i am unsure how to iterate through folders and only get files that dont exist.

share|improve this question
That's a jumbled collection of vague ideas. The first thing you need to do is work out exactly what you are trying to achieve, then ask a clear question. – John Gardeniers Jul 13 '10 at 19:24
I got an answer that covered all of these 'ideas'. It was a great answer too. – acidzombie24 Jul 13 '10 at 19:45
up vote 6 down vote accepted

Try WinSCP yet? It's scriptable, pretty easy to use, and has plenty of documentation.

Or if you're more familiar with rsync, there's a verion of that for Windows too, called DeltaCopy.

share|improve this answer
excellent, i have been using WinSCP. The scripting looks nice, i havent gone too much into it (i have code working in the console but havent put it in a script file). I notice when i sync my local copy if a file has been edit my local copy is changed. I am concerned if my server gets compromised and all my backups are corrupted this will carry the change to my local files. Is there a way to get files but not update existing files? – acidzombie24 Jul 13 '10 at 19:35
I figured it all out! nice! – acidzombie24 Jul 13 '10 at 19:43
For others, the commands i used are the below with call being available if i want to run scripts --> open user:pass@domain synchronize local C:\path\backup /path/backup -criteria=none exit – acidzombie24 Jul 13 '10 at 19:48

FTP would work for this, but is not that secure.

A good alternative is to set up sftp.

Putty windows clients for file transfer:

share|improve this answer

I'd look at rsync or rsync over SSH to do that. There should be a port for Windows available. Rsync's algorithms are fast, and it won't duplicate data that already exists (only changing/copying changes so that for copies over a network, if you have, say, a 200 meg video and only a few meg had been edited, that few meg will get copied, not the whole thing).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.