Hello everyone, I am new here at the forums, but I have a little Linux background from college getting Linux + certified. Although I am certified, I got that certification when Fedora Core 4 was out and now it's way beyond that... plus I haven't used Linux much since I got out of college. Anyways enough about me.. here's what I've got.
I work at a hospital. The hospital has an outter office that reads x-rays from the hospital. We have these on a server here at the hospital (in folders named after the day 04.06.11) and we are going to be uploading them to a corporate server so the outter office can see them. We are using SFTP for this. Currently I am working in Windows, but I am using the putty program inside of command prompt, which uses Linux based commands.
Right now whenever a new x-ray comes through a person from our hospital puts the file into an archive folder on the server. We then run Xcopy to copy over the new files. Here is my xcopy command
xCopy /d /s /e /m /y SERVERNAME\mesa\archive\*.* d:\mesa\
This copies the files from the folder archive to the d:\mesa folder.
Now what I've got are 2 scripts I've wrote to connect to the SFTP site and switch to the directory needed and copy files over.
psftp -pw XXXXXX -l USERNAME@SERVER -P XXXX -b C:\Users\\ME\Desktop\ftp2.bat
open "USERNAME@SERVER" XXXX
Now what I am wanting to do is something like Xcopy, but with the ftp site.
Is there ANY way to get it to where the mput or put command looks for only new files that are not already on the server? What's going on now is whenever I run this, it will copy all the files over again whether they are already there or not.. waisting time and bandwidth. I thought about running a script to compare the archive folder and regular mesa folder to a text file then copy those files over, but I can't seem to figure this out either.. although that would be a Windows batch file to do that I'd hope someone here could help me. I'd greatly appreciate any help offered, as this will make my job a lot easier so I can just schedule a task to do this and I can do other things.
Thanks in advance!