how do i start.... .

Ninnad Jagtap

Active member
Joined
Apr 12, 2005
Messages
35
Programming Experience
Beginner
i Need to develop an application that will read image files from a 1 server's folder place it on other server's folder save it in database and then delete the file from the original server's folder that it has picked up from.And this should be done on regular bases say after every 2 days.

I need to know how do i start with do i need to use socket programming for that or any other thing.
 
If these images are stored in shared folders then there is no need to use Sockets. If your app can see the folders it needs to use then it can simply use regular IO operations, like File.Copy and File.Delete. If your app can't see the folders then it would need to communicate with another application on the other machine that can see the folders and then use Sockets to transfer the data.
 
But i need to consistently keep a watch on folder and then if there is new file in that folder i have to pick it up and throw it in other file.and then delete the file from that original folder and i need to save the file in server folder which will then be saved in database and can be retrived and modidifed
 
To watch a folder for changes, whether locally or a shared network folder, you can use a FileSystemWatcher object. As for the rest, what I said previously applies. You can put a single app on one machine, have it watch a shared folder on another machine and, when it detects a new file, have it Move that file to the local machine and save it to a database. As I have already said, if you are not using shared folders then you would need to use two applications that talk to each other via Sockets. There is an example of using Sockets in the 101 samples for .NET 1.1.
 
Back
Top