|
|
Subject:
enumerate directories on a file server for vb6
Category: Computers > Programming Asked by: bradjensen-ga List Price: $20.00 |
Posted:
14 Oct 2003 09:35 PDT
Expires: 13 Nov 2003 08:35 PST Question ID: 266122 |
I want to have my vb6 program watch directories for new files, changed files, etc. I've found several examples for watching local directories with the microsoft windows api, but none of them work on a drive across the network (I don't want to install the software ont he network file server.) I can do this with the file system object, but that requires me to reparse the directories - causing network performance problems. Is there an api way to watch directories remotely? Brad Jensen | |
| |
|
|
Subject:
Re: enumerate directories on a file server for vb6
Answered By: joseleon-ga on 06 Nov 2003 00:55 PST |
Hello, bradjensen: Thanks for allowing me to answer this question even if the answer is "no, you cannot do that", most customers doesn't like this kind of answers. As I said in my comments, there is no API to monitor file changes across the network, it exists only to do it on the local filesystem, this is a limitation of the OS, that is, it doesn't include this feature by default. It would be a great feature for developers, but it doesn't exists because even the File Explorer doesn't automatically refreshes changes on network drives. The File Explorer uses some "tricks" to get updated, for example, when the user makes the window active, or using a timer to refresh the contents, but it's not get notified about changes, it "refresh" the full directory contents. So you have to think in a tricky way or a workaround to make this work, if you tell me more about your app, I will try to help you. You say you don't want to install anything on the clients, but this is the only "straight" solution possible right now, you install a custom software on each client monitoring file system changes and then, broadcast that info to the network. Then, if there is a client listening, it will get notified about those changes. Thanks again for let me answer this question even the answer is no and don't hesitate to request for any clarification. Regards. |
|
Subject:
Re: enumerate directories on a file server for vb6
From: joseleon-ga on 15 Oct 2003 13:08 PDT |
Hello, bradjensen: As far as I know, there is no way to monitor directories for new files across the network without install a custom software on the server. There is no API for that because as you can see, even the Windows File Explorer needs to be refreshed to show changes. I tell you this from my experience, but you can wait to see if another researcher comes with a solution. Regards. |
Subject:
Re: enumerate directories on a file server for vb6
From: bradjensen-ga on 16 Oct 2003 16:42 PDT |
Thanks for the comment. I'm wondering when explorer is refreshed, what it does. Sometimes it automatically refreshes. Meanwhile I am reading the directories with the filesystem object, not elegant. Brad |
Subject:
Re: enumerate directories on a file server for vb6
From: joseleon-ga on 17 Oct 2003 00:11 PDT |
Hello, bradjensen: Of course, you can set a timer and refresh the file list "manually", but I think you are looking the inverse process, that is, some kind of "event" that informs you a new file is in the directory, so you don't have to "poll" looking for changes. You can do it on the local file system, but not over the network. Regards. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |