[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

Synchronize files/directories via HTTP

Can anyone tell me Is there any algorithm or source-code that synchronize files/directories via HTTP.

thanks.

Dan
0
walkdan
Asked:
walkdan
1 Solution
 
snoeglerCommented:
There is the same algorithm as there is for synchronizing files via serial cable or via network or ...

HTTP offers to possibility to
- read only the HEADer information of a file
- GET a file
- PUT a file ( which is only supported - if at all - after being authenticated )

which are all methods you need to forward synchronize _files_. To my knowledge, there is no standardized HTTP command to create a directory, to remove a directory or to remove a file.

1. For each directory in the local directory, perform this 2. For each file in the local directory, use the HTTP HEAD command to test if it is available on the destination machine. If it is, compare the date/time of the file (which is also returned by HEAD). If equal, you should be able to assume that is hasn't been modified, and continue at 4.
3. Upload the file via HTTP PUT.
4. If there are any files left in the current directory, continue with 2.

This leaves all not anymore used files and directories on the server. To get around this, you could use FTP which allows all of the tasks to be performed; let me know if you want that.
0
 
griesshCommented:
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "snoegler" comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

Please do not accept this comment as an answer!
======
Werner
0
 
NetminderCommented:
Per recommendation comment force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now