Houmoller Posted November 13, 2013 Report Share Posted November 13, 2013 Hi lava, I hope you can help me with my problem. The problem that I want to solve (in a proper way) is the following: I have a list of all the *.dat files in a folder. I want this list to update every time a new *.dat file i created in that folder. I don't want to pool the folder constantly so I have solved this problem by using a dynamic event from a .NET action. This is all nice and great. My problem is, that if I change the folder, my dynamic event does not execute when a new file is added to the new folder. I have attached two snippets of the main part of the code. In the mainVI, I first setup some events. The events are then written to a global variable. It is this global that I use when broadcasting the event. In the watch_dir.VI the .NET event is setup. I look for files that are created, deleted, changed or renamed. (Most of the code is from Steve Chandler's nugget: http://forums.ni.com/t5/LabVIEW/My-First-Nugget-Directory-Changed-Event/m-p/1407552) I have tried initializing the different events when the folder is changed,but that does not seem to fix the problem. I hope I have made myself clear, but please dont hesitate in asking questions. I could off course just pool the number of files in the folder or something like that, but that doesn't seem right to me. I hope you can help me. -Jørgen Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.