Example Code

Event based File and Folder Watcher

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This is a simple VI that Listens to the file system change notifications and raises events when a directory,


Description
The example Listens to the file system change notifications and raises events when a directory, or file in a directory, changes. Based on .NET Callback Event (FileSystemWatcher) this example fires a user event if a file or the content of a directory changes.

 

Requirements

Software:

1.LabVIEW 2014 (or compatible)

2.Win OS with .NET 4.0 or higher


Steps to Implement or Execute Code

1.Unzip attached file

2.Run File System Watcher Example.vi

3.Change, create, delete or rename file in selected folder

 

Additional Information or References

VI Snippet

Event based File and Folder Watcher 2014 NIVerified.png    

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
iannicholson
Member
Member
on

I would really like to see this backported to LabVIEW 2013 if someone has time. Thanks!