Easiest way to perform an automated function 'dos batch file?'

I need to do the following routine every 4 hours or so and wondered what the easiest way to do it was:
"to send a file between 2 servers (where vpn not possible)" : file size <200kb
-compress a folder on both servers, email or ftp the file to each other
-each server to send a confirmation to the other that the file has been successfully received
-the folders containing the files at each end to have their contents deleted
-email confirmation to be sent in the even that the file doesnt get to the other server within an hour

I was going to try and do it within a batch file but suspect I might struggle with the email sending and receiving.

For reference, one of the servers is in China and we are having really serious issues, because of government data screening, to get a VPN stable enough to rely on to do this process, though if there was a way whereby it could retry sending it simply using a fully qualified path directly to each other that would be another option, otherwise email or ftp i think are the only options, and again I'm not sure how to automate ftp transfer (and confirm they were successul) in dos!

It must be noted I am VERY much a novice...
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve KnightIT ConsultancyCommented:
Can they access dropbox from there? If so have a look at http://www.dropbox.com. and get a free account.  You can set both machines up with one and they both "see" the same data synced over the net to them.  There are various other such services but this does seem to work nicely from my trials...

Sending an email isn't too difficuly using blat.exe or a little VBScript if you have access to an SMTP server at both locations and FTP can be scripted:



but there is a fair amount of glue to put in there with the checking, zipping up (maybe 7zip or other command line tools) etc. which I'm afraid I don't have the time right now to look at for you.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
andrew_2706Author Commented:
Thank you, I will see if I can at least make a good start on this with blat!
I've kind of put together the outline of a batch, there are just sub-routines for sending the mails which i need to finish so that shouldnt (touch wood!) be too bad.
Steve KnightIT ConsultancyCommented:
If you need any more please post your script and will help if I can and plenty of others will help if not anyway (if you make a new Q post a link here so it gets seen)
andrew_2706Author Commented:
Thanks again, the dropbox service has some articles associated regarding china having blocked it earlier this year so i was gutted, but i installed it anyway and it worked like a dream even on the chinese leased line - excellent. All i need to do now is use a scheduled batch file to check the files are there at the right time and use blat to email if not - thank you so much.

Steve KnightIT ConsultancyCommented:
No problem.... I did wonder whether it would get blocked or not but the automagically arriving files on machines is certainly clever.  I assume it is user based though such that a user needs to be logged in though haven't investigated that more yet for my own needs were just related to a few users from different companies keeping files in sync over the net.

Hope it goes well in the end then!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.