smackababy
Lifer
I have an interesting problem I just encountered and could use a bit of advice. I don't normally work with writing files (zip in this case) and am wondering the best way to approach this situation.
I have an API supplied by a company that allows me to retrieve folders from their system (document management software, with no way for my company to back up our files, once entered or, as is our case, move all our documents out of the system to a new system). Now, I am working in C#, which I have limited experience, but it is going along pretty good for a single instance.
However, they want this executable to be able to be run from multiple locations, saving to a central file repository (network drive), without overwriting each file. These multiple instances of this program can't be aware of themselves. The problem lies in that I am unsure how to handle the multiple files. I know the order in which the files will be created (there are like 70,000+). Doing something like
won't work, as getting the data to add create the zip from can take upwards of 20 seconds to return from their server before it even begins creating the zip file, itself.
Is there a way, outside of possibly listing the files in a text file or something, to do this without communication between instances?
This doesn't have to be an entirely elegant solution, as it is an internal program used by really just me, at the moment, but I'd like it to be somewhat scalable beyond two instances.
Thanks.
I have an API supplied by a company that allows me to retrieve folders from their system (document management software, with no way for my company to back up our files, once entered or, as is our case, move all our documents out of the system to a new system). Now, I am working in C#, which I have limited experience, but it is going along pretty good for a single instance.
However, they want this executable to be able to be run from multiple locations, saving to a central file repository (network drive), without overwriting each file. These multiple instances of this program can't be aware of themselves. The problem lies in that I am unsure how to handle the multiple files. I know the order in which the files will be created (there are like 70,000+). Doing something like
Code:
Directory.GetFiles(networkLocation).Contains(<file I am trying to save>)
Is there a way, outside of possibly listing the files in a text file or something, to do this without communication between instances?
This doesn't have to be an entirely elegant solution, as it is an internal program used by really just me, at the moment, but I'd like it to be somewhat scalable beyond two instances.
Thanks.