|
-
Jun 10th, 2003, 12:53 PM
#1
Thread Starter
New Member
Connecting to another computer in Home Network
Hi,
I have two computers connected to a hub and then to the Internet. I like to know how to access them through visual basic (I mean code wise). I have no idea how to start this. They are sharing resources and everything so they can see each other and share resources.
My goal is to connect to these computers in order to synchronize some folders with its subfolders and the materials in it.
I have tried using windows synchronize command however it does not synchronize the subfolders. It would just do the files in the folders. So I am left with bunch of files at the end not knowing which is which.
If you have any idea of how to go about this I really appreciate if you share it with me.
-
Jun 10th, 2003, 01:35 PM
#2
Would you be willing to have this happen when you press a button?
You could make a program that has a shortcut somewhere (of your choosing) that goes to the other computer and copies everything important across.
However, once you start down this road, you'll probably realize that the exact feature list will start ballooning. After all, you'll only want certain folders....but why add some customization screens so that you can select these folders dynamically....then you could do some more to alter the files in the folders...then have it run in the background at set intervals.
Therefore, berfore you ask to synch your computers, you must first determine whether the answer will sink you.
-
Jun 10th, 2003, 02:25 PM
#3
Thread Starter
New Member
Thanks for the help.
I think what I was really asking for was how to connect to another computer. I mean using winsock or anything like that. I like to do synchronization at the moment but later I might was to do other things.
sounds stupid???
-
Jun 10th, 2003, 02:58 PM
#4
Winsock is probably not the best choice. If you go that route, you would need a program running on each side. This could be done with a program running at startup, but minimized to an icon in the system tray.
At some point, one would initiate a connection with the other, and the files would be transferred across.
However, that seems like an inordinately messy route unless you want this synchronization to take place in the background, and even then it might be messy.
After all, if you can see the other computer and its files and folders in the open file dialog box, then you should be able to copy the files as if it were a local computer. The only problem would be getting the correct path. Off hand, I don't know what this path would look like, but I would start by looking at one of the folders I wanted to synch, and setting the options for that folder to show the full path in the address bar. That will show you how the path must be written.
After that, you only need a function that copies one directory to another. I feel fairly certain that question has been answered repeatedly on this forum (though I don't have anything handy myself), so a search would probably give you a couple of examples of code that does this.
The last issue you would want to deal with is whether you want to be checking file attributes, such as file date, to decide which files to copy. On a local system, speed may not be an issue, but you probably don't want to replace new with old.
Perhaps this will have been somewhat more helpful.
-
Jun 10th, 2003, 03:01 PM
#5
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|