Need something to ssh/scp transfer files from windows to Unix

chuck2002

Senior member
Feb 18, 2002
467
0
0
I would like to copy only files that have changed in the last week from a backup directory on a windows server to a Unix server.
Givens:
Transferring from Windows to Unix
Cannot install anything extra on the Unix server, but can install at will on Windows
I have a directory of lots of big files up to 2 months old on a windows server
I have a Unix server with a big drive elsewhere I want to backup to
I can SSH/SCP only
I can authenticate via certificate to unix from windows, so I would like to script the file copies

Challenge:
I want to copy only the files that have changed in the last week because I don't have capacity on the destination drive to copy everything (I will schedule deletions of old files in unix as a separate job.)
Must be scriptable
Must not re-copy files that already exist.

Thanks for the help.
 

chuck2002

Senior member
Feb 18, 2002
467
0
0
Ya I looked at that and it does everything but copying over files that have changed in the last 5 days. Otherwise it is where I was leaning. If you know of a way to tell winscp to copy based on last modified date, let me know. Thanks.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,438
4,270
75
If you're willing to do some BASH scripting...

1. Install Cygwin. That lets you use most Linux commands under Windows.
2. Begin by using Cygwin's "find" command in your shell script. You probably want -mtime 7, and to put the find in a for loop.
3. Here's some ways to avoid re-copying an existing file.

Edit: Or maybe you could do find, ExpanDrive, and xcopy /D?
 

chuck2002

Senior member
Feb 18, 2002
467
0
0
Thanks for the suggestions Ken. Maybe expandrive could do it. I haven't had much luck with cygwin in the past, so maybe that one as a last resort.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
pscp can do the scp but you'll still need to figure out which files to copy with a script.