What would be the best way to copy files from one computer t

I have a solution that manages (among other things) court documents.

I add and remove documents into comp-A at this location:

…\application_server\server\webapps\ROOT\my_solution_directory_comp-A

I also want to copy and remove documents in the directory of the other computer:

…\application_server\server\webapps\ROOT\my_solution_directory_comp-B

What’s the best way to do this? I think in just add some lines in the method so that the documents are stored (or removed) in (or from) both locations. Is there a better way?

Thanks!
Carlos

Hi Carlos,

Well, that would seem to me to be as good a way as any. There might be some “Servoy magic” that I’m unaware of, but simply doing the I/O for both files from within a method sounds like the most obvious way to do it. There are ways you could move some of the I/O outside of Servoy, I suppose. You could update one of the files from your Servoy app and then use something on that computer to update the 2nd, perhaps a secondary app, or some mirroring software or something like that. But doing that removes some of your control, since if you control it from within Servoy, you know it’s happening, while if you have a secondary mechanism for doing the other update, you’re kind of “hoping” that it happens. :-)

I’m just finishing my 1st Servoy app now, so I’m probably not the best person to be commenting on this, but that’s my 2 cents, anyway.

Ron

Thank you Ron. You are right. I think I stick with the idea of having a single method managing the files. This keeps things simpler.

I thought about using something outside of Servoy, perhaps a synchronized-backup solution to keep in sync the files at both locations that I will run as a batch process on the clock.

This is perhaps not a good idea because: (1) it seems to me that the machine will have to be checking every so often for something, even if there is no need to touch the files. This might make the machine to do unnecessary work. (2) It adds complexity to the system – make the total application more difficult to manage. (3) As you said it, I might not know what it’s happening. It won’t be under the scope/eye of Servoy, and I will have one more thing to check/to configure.

Well, it seems to me that Servoy as the main manager of the whole thing system should continue.

If anyone have any other idea, -best way to do this -best practice on this regard, or any additional advice, please post here.

Thanks,
Carlos