Home > Networking Tips > > Freeware tool logs file system events
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Freeware tool logs file system events


Serdar Yegulalp, Contributor
07.18.2005
Rating: -4.33- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Please let us know how useful you find this tip by rating it below. Do you have a useful Windows tip, timesaver or workaround to share? Submit it to our tip contest and you could win a prize!


I have often been asked if it's possible for Windows to "watch" a given file and perform an action if the file is modified. There hasn't been a built-in provision in Windows to do this, except in the sense that you could write a kernel-level file system filter to trap such actions.

Well, the wait is finally over. XTWare has created a free service called FileNotify that traps events on specific directories and performs an action when anything is changed or modified.

FileNotify is a lightweight program: It's a single executable that runs as a system service. There is, however, no installer -- it needs to be registered by hand, but it is easy enough to remove as well. Once set up, you can create a list of directories (with a supplied editor application) that watches for any of the following actions: file creation or modification, deleting files, modifying attributes or names (including long filenames) and changing security tokens. You can use any of these actions to trigger a command-line action, such as a batch file or an .EXE.

The program logs its actions to a text file that, by default, is FileNotify.Log (located in the directory that FileNotify itself is running in).

The program also checks directories recursively -- you can point it at a top-level directory and ask it to watch all files or folders under that directory.

Be warned that if one of the actions triggered by a file change involves modifying a file in one of those watched directories, it can create a race condition. Also, whenever a file is changed, FileNotify waits for a full second of inactivity on that file before attempting to perform any actions on its own. It does this because sometimes when a file is changed, the Last Modified attribute is updated multiple times. The delay allows all of the changes to "settle" before action is taken.

Finally, FileNotify cannot monitor activity on a single file, but you can work around this by using a batch file with an input parameter (i.e., mybatchfile.bat %1) as the on-change action. The first line of the batch file can filter for a specific file like this:

If "%1"=="filename.fil" goto myaction


Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!


Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Network Performance Management
Web gateway helps Texas manufacturer develop network user management
Desktop virtualization network challenges: A primer
Green enterprise: Three networking investments that make a difference
Storage area networks change management primer
CA-NetQoS deal: Network management = application performance
Virtualization change and configuration management primer
Network change and configuration management primer
Distributed network management means no more hard NOCs
WLAN QoS and SLA monitoring with 7/24 Wireless Quality Assurance costs
Network management from a service-based perspective

LANs (Local Area Networks)
Testing LAN switch power consumption: A best practices guide
3Com acquisition confirms HP-Cisco battle for China
Integrated wireless and wired LAN: Brocade-Motorola deal ups the ante
Enterprise passive optical networks: a spanning-tree LAN alternative
10 Gigabit Ethernet tutorial: Connecting data centers, storage, LAN and beyond
Intelligent edge switches: Complexity is driving a smarter LAN
Q&A: Jim Metzler previews the networking track at Interop
Extreme's port extender can replace consumer devices at network edge
VLANs versus IP subnets: Why use a VLAN over IP subnetting?
Troubleshooting VLANs: How to monitor 802.1q tagged traffic

Working With Servers and Desktops
What network loss testing tools/methods calculate dropped packets from a PC?
Do I have to disable DHCP on my router to create a DHCP server?
How can I replicate the services of Active Directory (AD) in ADC?
Top 10 reasons why computers do not have network access to each other
Troubleshooting -- 'Network Know-How' Chapter 17
Windows Server 2008 IP routing configuration: Static and dynamic RIPv2
Understand Windows tracert output to troubleshoot network connectivity
Test your TCP/IP protocol stack to troubleshoot network connectivity
Checking IP configuration to troubleshoot Windows network connectivity
Physical network security key to fighting low-tech threats

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
baseboard management controller  (SearchNetworking.com)
fault management  (SearchNetworking.com)
loose coupling  (SearchNetworking.com)
maximum segment size  (SearchNetworking.com)
maximum transmission unit  (SearchNetworking.com)
network coding  (SearchNetworking.com)
packet loss  (SearchNetworking.com)
phase-change cooling  (SearchNetworking.com)
round-trip time  (SearchNetworking.com)
throttled data transfer  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Networking Solutions for Business

Alcatel-Lucent Network Business Communications Solutions

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts