Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > Windows Server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-07-2008, 11:48 PM
vivekian
 
Posts: n/a
Filesystem Notification

Hi,

Writing a small application which requires the application to be
informed when the content / filename / location of a particular file
changes. Is there a Win32 class available which does this ?

Thanks in advance,
vivekian
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 02:14 AM
Kellie Fitton
 
Posts: n/a
Re: Filesystem Notification

On Apr 7, 3:48*pm, vivekian <vivekase...@gmail.com> wrote:
> Hi,
>
> Writing a small application which requires the application to be
> informed when the *content / filename / location of a particular file
> changes. Is there a Win32 class available which does this ?
>
> Thanks in advance,
> vivekian



Hi,

You can use the following API to retrieve information that
describes the changes within the specified directory:

ReadDirectoryChangesW()

http://msdn2.microsoft.com/en-us/lib...65(VS.85).aspx

Kellie.

Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 03:45 AM
Michael D. Ober
 
Posts: n/a
Re: Filesystem Notification

"Kellie Fitton" <KELLIEFITTON@yahoo.com> wrote in message
news:60ab34b1-ef43-4c37-b1bb-9579e052bbe3@a5g2000prg.googlegroups.com...
On Apr 7, 3:48 pm, vivekian <vivekase...@gmail.com> wrote:
> Hi,
>
> Writing a small application which requires the application to be
> informed when the content / filename / location of a particular file
> changes. Is there a Win32 class available which does this ?
>
> Thanks in advance,
> vivekian



Take a look at the FindFirstChangeNotification API. In the MSDN library,
the path is Win32 and COM Development -> System Services -> File Services ->
File Systems ->Directory Management -> Using Directory Management ->
Obtaining Directory Change Notifications. If you are coding in dotNet, take
a look at the System.IO.FileSystemWatcher class which is a wrapper for the
FindFirstChangeNotification API functions.

Mike.



Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 03:52 PM
Eugene Mayevski
 
Posts: n/a
Re: Filesystem Notification

Hello!
You wrote on Mon, 7 Apr 2008 15:48:19 -0700 (PDT):

v> Writing a small application which requires the application to be
v> informed when the content / filename / location of a particular file
v> changes. Is there a Win32 class available which does this ?

You can try FindFirstChangeNotification API as mentioned, but it seems that
it won't be enough for your task as it won't give you information that your
file has been moved or renamed.
You can check CallbackFilter ( http://www.eldos.com/cbflt/ ) that would let
you track file system events in real-time and give complete control over the
events.

With best regards,
Eugene Mayevski
http://mayevski.blogspot.com/

Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 03:54 PM
vivekian
 
Posts: n/a
Re: Filesystem Notification

On Apr 8, 9:52*am, "Eugene Mayevski" <mayev...@eldos.com> wrote:
> Hello!
> You wrote *on Mon, 7 Apr 2008 15:48:19 -0700 (PDT):
>
> *v> Writing a small application which requires the application to be
> *v> informed when the *content / filename / location of a particular file
> *v> changes. Is there aWin32class available which does this ?
>
> You can try FindFirstChangeNotification API as mentioned, but it seems that
> it won't be enough for your task as it won't give you information that your
> file has been moved or renamed.
> You can check CallbackFilter (http://www.eldos.com/cbflt/) that would let
> you track file system events in real-time and give complete control over the
> events.
>
> With best regards,
> Eugene Mayevskihttp://mayevski.blogspot.com/


Thanks a bunch for all the pointers !!
Reply With Quote
  #6 (permalink)  
Old 04-08-2008, 04:10 PM
Christian ASTOR
 
Posts: n/a
Re: Filesystem Notification

On 8 avr, 16:52, "Eugene Mayevski" <mayev...@eldos.com> wrote:

> You can try FindFirstChangeNotification API as mentioned, but it seems that
> it won't be enough for your task as it won't give you information that your
> file has been moved or renamed.
> You can check CallbackFilter (http://www.eldos.com/cbflt/) that would let
> you track file system events in real-time and give complete control over the
> events.


SHChangeNotifyRegister() does this...
Reply With Quote
  #7 (permalink)  
Old 04-08-2008, 04:35 PM
Eugene Mayevski
 
Posts: n/a
Re: Filesystem Notification

Hello!
You wrote on Tue, 8 Apr 2008 08:10:24 -0700 (PDT):

CA> SHChangeNotifyRegister() does this...

"This function is available through Microsoft Windows XP Service Pack 2
(SP2) and Windows Server 2003"

Also, this gives only notification and not control.

With best regards,
Eugene Mayevski
http://mayevski.blogspot.com/

Reply With Quote
  #8 (permalink)  
Old 04-08-2008, 05:12 PM
Christian ASTOR
 
Posts: n/a
Re: Filesystem Notification

On 8 avr, 17:35, "Eugene Mayevski" <mayev...@eldos.com> wrote:
> Hello!
> You wrote *on Tue, 8 Apr 2008 08:10:24 -0700 (PDT):
>
> *CA> SHChangeNotifyRegister() does this...
>
> "This function is available through Microsoft Windows XP Service Pack 2
> (SP2) and Windows Server 2003"


It's available since NT4 (dynamic call), but was not documented
before...
Reply With Quote
  #9 (permalink)  
Old 04-08-2008, 06:08 PM
vivekian
 
Posts: n/a
Re: Filesystem Notification

On Apr 7, 7:45 pm, "Michael D. Ober" <obermd.@.alum.mit.edu.nospam.>
wrote:
> "Kellie Fitton" <KELLIEFIT...@yahoo.com> wrote in message
>
> news:60ab34b1-ef43-4c37-b1bb-9579e052bbe3@a5g2000prg.googlegroups.com...
> On Apr 7, 3:48 pm, vivekian <vivekase...@gmail.com> wrote:
>
> > Hi,

>
> > Writing a small application which requires the application to be
> > informed when the content / filename / location of a particular file
> > changes. Is there a Win32 class available which does this ?

>
> > Thanks in advance,
> > vivekian

>
> Take a look at the FindFirstChangeNotification API. In the MSDN library,
> the path is Win32 and COM Development -> System Services -> File Services ->
> File Systems ->Directory Management -> Using Directory Management ->
> Obtaining Directory Change Notifications. If you are coding in dotNet, take
> a look at the System.IO.FileSystemWatcher class which is a wrapper for the
> FindFirstChangeNotification API functions.
>
> Mike.


I imagine coding in dotNet would require the .NET platform to become a
prerequisite for the application ?

~vivekian
Reply With Quote
  #10 (permalink)  
Old 04-09-2008, 02:49 AM
Michael D. Ober
 
Posts: n/a
Re: Filesystem Notification

"vivekian" <vivekaseeja@gmail.com> wrote in message
news:f4e4bced-805c-4dc4-a00e-4e8e533b04a4@u36g2000prf.googlegroups.com...
> On Apr 7, 7:45 pm, "Michael D. Ober" <obermd.@.alum.mit.edu.nospam.>
> wrote:
>> "Kellie Fitton" <KELLIEFIT...@yahoo.com> wrote in message
>>
>> news:60ab34b1-ef43-4c37-b1bb-9579e052bbe3@a5g2000prg.googlegroups.com...
>> On Apr 7, 3:48 pm, vivekian <vivekase...@gmail.com> wrote:
>>
>> > Hi,

>>
>> > Writing a small application which requires the application to be
>> > informed when the content / filename / location of a particular file
>> > changes. Is there a Win32 class available which does this ?

>>
>> > Thanks in advance,
>> > vivekian

>>
>> Take a look at the FindFirstChangeNotification API. In the MSDN library,
>> the path is Win32 and COM Development -> System Services -> File
>> Services ->
>> File Systems ->Directory Management -> Using Directory Management ->
>> Obtaining Directory Change Notifications. If you are coding in dotNet,
>> take
>> a look at the System.IO.FileSystemWatcher class which is a wrapper for
>> the
>> FindFirstChangeNotification API functions.
>>
>> Mike.

>
> I imagine coding in dotNet would require the .NET platform to become a
> prerequisite for the application ?
>



True, which is why I listed both methods. The question of monitoring the
file system appears periodically in the dotnet programming groups as well.
Your post wasn't clear what your development environment was. Also, the
FindFirstChangeNotification supports renames, creates, closes, changes, and
deletes. The one drawback is that the file system must be on an NT4 or
Windows 95 or later system. Samba doesn't support this API.

Mike.

Mike.


Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > Windows Server


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:00 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Loan | Mortgage Loans | Słownik angielski | Loans | Modded Xbox



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114