• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Monitoring File System

 
Landon Blake
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking for an open source Java application that allows me to monitor a Windows file system. Something that creates a log when files are opened, modified, moved, copied, or deleted. Does anyone have any suggestions?

If there isn't already an open source application that does this, does anyone know how I could accomplish it via Java and a Microsoft API? I would like to track changes without forcing the user to work with the file system through an independant portal. I'd like to observe and log the changes from a more passive perspective.

The purpose of this application will be to add the information about changes to files and the filesystems in a database that tracks data.

Thanks,

Landon
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One idea might be to skip Java all together for this task. If you're working on a Linux system, you could alias the commands in which you're interested (i.e. mv, cp rm, etc.).

You could alias these commands so that the operation is logged to a text file or database prior to running the user's request.
 
Landon Blake
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dave.....I wish I was working in Linux, but in this case I've got to deal with Windows. Any other ideas?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There must be Windows APIs. I use several editors that alert me when the file I'm editing has been changed by another program. You'd have to use JNI to bridge between Java and a C/C++ module that uses those APIs. If you have the C and Windows skills to do that part, look for a JNI tutorial.
 
Joe Ess
Bartender
Posts: 9256
9
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Stan James:
I use several editors that alert me when the file I'm editing has been changed by another program.


Ya know, Eclipse does that, and it's open source. Maybe our friend here should check out the Eclipse user and developer mailing lists and see if there's any traffic about this subject.
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IntelliJ IDEA has a DLL file called FileWatcher2K.dll in its bin directory, which would lead me to believe that it uses JNI to accomplish this also.
 
Jeffrey Spaulding
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and then there is Perl. I remember something like that from




Perl for System Administration
Managing multi-platform environments with Perl
By David N. Blank-Edelman
1st Edition July 2000
ISBN: 1-56592-609-9

 
Landon Blake
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I need to be looking for something I can tweak to suite my purposes. Does anyone know of an open source file/directory browser written in Java? Something similar to windows explorer?

Thanks,

Landon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic