Help with folder change library call

I'm attempting to create a labview function that waits on notification of a change in a folder, specifically a new file to be created. I'm trying to use the FindFirstChangeNotification, referenced here; http://msdn.microsoft.com/en-us/library/windows/desktop/aa364417(v=vs.85).aspx 
I've attached the .vi I'm having trouble with where I get the notification handle. It returns error 1097 when run. Any ideas?
-Ian
Solved!
Go to Solution.
Attachments:
folderChangeNotify_TEST.vi ‏62 KB

iyeager2012 wrote:
I'm attempting to create a labview function that waits on notification of a change in a folder, specifically a new file to be created. I'm trying to use the FindFirstChangeNotification, referenced here; http://msdn.microsoft.com/en-us/library/windows/desktop/aa364417(v=vs.85).aspx 
I've attached the .vi I'm having trouble with where I get the notification handle. It returns error 1097 when run. Any ideas?
-Ian
The WinAPI solution you provided has just about all things configured wrongly in the Call Library Node. This version should be correct for both LabVIEW 32 Bit and 64 Bit and also provides the additional calls to be functional. It is not a perfect implementation if you want to wait repeatetly on the same event as there, one should not call FindFirstChangeNotification() each time but instead use FindNextChangeNotification() on subsequent calls. Also for a truely reusable library the creation of the handle, the subsequent reinitialization, and the waiting on the handle should probably be put in their own VI functions each. But it gives at least a correct Call Library Node configuration for the function calls involved.
 One caveat with this VI. It will block the LabVIEW thread in which it is called for the duration of the timeout (indefinitely with the default value that is in the VI) and LabVIEW can not be stopped in this situation, not even with the Abort button, since LabVIEW does not allow to reset a threads state when it is in external code. The only solution to get out of this state is killing the LabVIEW process (usually with the Task Manager) or forcing a change on the directory according to the configured change filter.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions
Attachments:
WIN Folder Change Notify.vi ‏21 KB

Similar Messages

  • Help with folder actions

    Automator is still a little confusing to me, I have virtually no experience, but wish to have automated emails sent when the contents of certain folders in my idisk/public folder are updated.
    First thing that confuses me is I thought automator worked with folder actions, it doesn't seem to for me and am left running an applescript to detect the changes and tell automator to send the email. This seems rather long winded and not what I'd expected.
    Second thing I can get what I've done to send emails when items are added to the folder, but not when they are modified/updated which is what I wanted. This is due to my lack of experience with scripting so any help would be appreciated.
    What I've got so far is
    '....on adding folder items to this_folder after receiving added_items
    try
    tell application "Automator".....'
    how do I change this to do what I want ?

    Winston,
    You need to save the Automator workflow as a folder action plug-in with it attached to the folder of interest. You start this process by selecting the "Save as Plug-in..." command under the File menu. You will then have to enter the name you want to use for the plug-in and select the "folder action" from the "Plug in for:" drop-down menu. An "Attached to Folder:" drop-down menu will appear and you can select one of those presented or navigate to something else by selecting the "Other..." choice (which you will have to do to get to your idisk/public folder).
    Once this is done then every time something is added or modified within the watched folder the Automator workflow will be triggered and run. In your case, because the folder is on iDisk, it will only be triggered when you are logged into your iDisk account.

  • Help with re-creating library

    Hey, all. I was using iTunes via an external hard drive that recently crashed and burned. To replace it, I got a portable external drive. I used anapod to restore my songs to my computer from my iPod. Now, though, I can't point iTunes to the portable external drive for the library. I went into the advanced settings and changed the location, and it shows that location, but it's reading from the old default location.
    Could anyone shed light on what I should do? Thanks for any help.

    Once you change the location, you have to go to file-->add folder to library and add the folder in the drive (all of its songs) to the library.
    btabz

  • Help with GCC4 $LDBLStub library errors

    At my work we use allot of custom shared libraries. under gcc 3.3 we were able to compile and create these libraries and work with our code, i am currently tring to upgrade to gcc 4 and i have noticed that our systems wont compile anymore. one of our custom functions xprintf in the library is called my other libraries and in the main code. it live in a library called pst.o
    when i compile the other libraries gcc 4 appends the following undefined symboles
    _xprintf$LDBLStub
    to the other programs
    gcc 3.3 did not do this and it would create
    _xprintf only
    is there a way to make gcc 4 do the same thing
    this is neccesary because i am trying to create univeral binaries to run on ppc and intel
    gcc version 4.0.1 (Apple Computer, Inc. build 5341)

    I have actually found the problem but i dont know how to solve it. i am hoping that you can help.
    imn out programms we use the macro -D printf=xprintf because we use a speacial format for output.
    in gcc 4.0 it seems to take this and create the $LDBLStub symole when you perform a macro subtitution i am not sure how to disable this and i can find a solution to it.

  • Please help with backing up library

    OK, this has maybe been addressed before but I'm new here and haven't really found an answer on the forums... My work is saved as monthly projects and I want to export them to an external HD with metadata and adjustments etc but retain a referenced version in my library on my mac. Make sense? If I need to get anything back I can do a quick search and plug in the HD - yes? Trouble is if I export the project as-is I can't reimport referenced files... This is maybe my poor working practice and I'd really appreciate some help with it. I've previously just exported versions then burned DVD's but I'd really like to keep a record of pics on the mac if poss. HELP PLEASE!

    buzzski wrote:
    Thanks so much for your help with this! It sounds exactly like what I want to achieve. I'm wondering now if I can export my entire library and bring it back in as referenced instead of managed - hopefully someone can advise? Thanks, Craig
    You don't need to export you can do it from within Aperture, see *File->Relocate Master*.
    Again check out the user manual Apple did a real good job with this one.
    And PLEASE, PLEASE, make a complete backup of your Aperture library before trying any of this we are not responsible for lost, missing or mutilated photos

  • Old Toad - help with lost iPhoto Library

    I posted in the iPhoto 06 board by mistake, I am actually running 08. I found the iPhoto library in Pictures, but it stopped in July 07, and I seem to have lost a year's worth of photos. Do you have any advice?

    Miriam:
    It may be that the photos are still there but that bunch has been lost from the database file. Try the three fixes below in order as needed:
    1 - launch iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library. Select all options.
    2 - rebuild the library using iPhoto Library Manager as follows:
    Using iPhoto Library Manager to Rebuild Your iPhoto Library
    1 -Download iPhoto Library Manager and launch.
    2 -Click on the Add Library button, navigate to your User/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File->Rebuild Library menu option
    4 - In the next window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: It may take some time to create the new library if you have a lot of photos.
    3 - start over with a new library and import the Originals folder from your original library as follows:
    Creating a new library while preserving the Events from the original library.
    Move the existing library folder to the desktop.
    Open the library package like this.
    Launch iPhoto and, when asked, select the option to create a new library.
    Drag the Originals folder from the iPhoto Library on the desktop into the open Photo window
    This will create a new library with the same Events as the original library if you have the Finder checkbox unchecked in the Events preference pane.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.≤br>
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Help with folder permissions issue

    Hello, I'm new to BI and I'm having issues with folder permissions.
    Here is what we are trying to do:
    We have two folders, lets say Folder A and Folder B. We have two application roles, Role1 and Role2.
    Folder A should have full control for Role1, Folder B should not be visible for Role2. Folder B should have full control to Role2, Folder A should not be visible for Role1.
    Under permissions for those two folders we have set it up accordingly. For Folder A, Role 1 has "Full Control", Role 2 has "No Access". Folder B, Role 2 has "Full Control", Role 1 has "No Access".
    Everything works fine if a user has one or the other role.
    But when a user has both the roles, they need to see both the folder but only see 1.
    What am I doing wrong? Thanks for the help in advance.

    if it's any consolation, seems to happen in the mac version, too. i use manually get album artwork on some new files imported from a CD - i renamed it exactly the same way it is in the itunes store, which previously always worked without fail. now, nothing. just says the requested resource can't be found. so, likely it's a bug.

  • Help with version changes...

    Ok, I have a CR2 file in aperture. I edit it in photoshop and it saves the changes I've made. In aperture I have two thumbnails of the image. The original and my new 'edited' version.
    Now here's my problem. I'm a conceptual photographer and I like to save different versions a long the way. At the end of any given image I can have 5-15 different versions... Example.
    Original version called dave.tif
    I'll make some changes to the file and (in my normal workflow) save the image as daver1.tif
    I'll make more changes and call it daver2.tif. Etc...
    The problem is that Aperture only seems to created one updated image and any changes I make to it overrides the previous version.
    Is there anyway to save each individual file without having to re-import?
    Thanks
    Dave

    Hi Dave. Aperture stores new versions as a small list of changes, within the Aperture database, and creates new files only when a version is exported. Because other applications cannot work with the list of changes, when an external editor is used (Photoshop in your case), Aperture must create a new file that the external editor can read.
    The new file is effectively another Master. If you make more changes to the externally edited image within Aperture, it creates a new version, i.e., a new list of changes.
    The end result is that a new image file is created from the original Master only when it is exported, whether the export is explicit or because external editing was used.
    If you want to make more changes in the external editor after having done so once, you will create another large image file each time the external editor is called from Aperture. You can avoid the proliferation of large files (the opposite of what you seem to want) by right-clicking (control-clicking) on the browser thumbnail and selecting "Show in Finder", then open the file in Photoshop (or whatever external editor), make changes and save. The image of that externally edited file will update within Aperture, without creating a new file.

  • HELP WITH RESTORING ITUNES LIBRARY

    hello, i backed up my entire itunes library to DVD prior to a computer crash. i've purchased a new computer and i was able to download itunes 8 and transfer my library to my new computer. i then plugged in my iPod (classic - 2004) to sync and received three messages: 1) the warning that i could only have one library and thus itunes would "erase and sync" my ipod - i clicked this option; 2) my itunes purchases would not transfer unless my computer was "authorized" - i authorized my computer; and finally, 3) my ipod will not sync due to a missing folder. i now have a completely erased ipod, my library on my computer, and i cannot sync. would appreciate any assistance. thanks.

    Scan the drive for files of the form *.itl - you may have managed to backup the media without saving the library database. If you can find the .itl file then it should be possible to fix up the library, otherwise it will be possible to reimport the media (in one go - File > Add Folder to Library) and I can suggest some tools for restoring ratings & playlists from your iPod.
    tt2

  • Help with Accessing iTunes Library from both Mac and PC

    Hi All
    I'm new to this community and new(ish) to the world of Mac.
    At home we share a single iTunes Library stored on a NAS Drive across 4 different Windows PC's (Mine, My Wifes and the 2 kids).  I have recetly got myself a MacBook Pro and hoped to hook it up to our central iTunes library.
    I was pleased to see that the Library opened but sadly none of the songs can be located and I get the dreaded grey symbol against tracks if I try and play them.
    On further investigation it would appear to be a naming convention issue.  The iTunes Library is expecting to see each song in the following location:
    file://localhost/Volumes/Music/iTunes Library/iTunes Media/Music/Artist/Album/song.mp3
    The problem is the localhost element as the mac sees the same location as:
    file://Volumes/Music/iTunes Library/iTunes Media/Music/Artist/Album/song.mp3
    Is there anyway of harmonising between the 2 systems?  or am I asking the impossible.
    Many Thanks .... Blue

    Thanks Jim
    That does make sense.
    BUT ... have been doing some more investigation and it appears that my Windows iTunes is displaying the same symptoms and the tracks have lost connection with the iTunes Library.
    I'm now very confused ....
    I take it what I am trying to do IS possible?
    Any other suggestions.
    Many Thanks .... Blue

  • Need help with folder level javascript to automate "save button" on a fillable form

    I have been racking my brain for the past 6 hours trying to get a simple save button to work.
    Background: I am using Acrobat Pro 11 to create a save button on a fillable form. My intent is for the end users (my team of 3, whos computers I have access to) to be able to fill out the form, click save, and have the filename appended with date and other info and saved to a local folder on their machine.
    I am attempting to take the default form name i.e. Support Call Log.pdf and have three of the feilds within the form generate a new file name. --> Support Call Log_Brad_121_2015
    End users will fill out the form using adobe viwer X.
    Instead of putting the code that I have tried, modified, and tried again and again. I would like to ask for a fresh start and then see if I can locate my error after. I need to know what to put in my folder level script, line for line.
    I also need to know the correct syntax and format to establish a new file name with the extracted feild data, saved to the same exact file path as the original document.
    Any and all help will be greatly appreciated, I am about to go crazy!!!

    Didn't let me do it, invalid. So, here is what I have now changed my button code to:
    //get field value
    var fv1 = getField("Technician:").value;
    var fv2 = getField("Date Received:").value;
    var fv3 = getField("Unit Number:").value;
    // Split Path into an array so it is easy to work with
    var aMyPath = this.path.split("/");
    // Remove old file name
    aMyPath.pop();
    var NewFileName = "Support Call Log" + "_" + fv1 + "_" + fv2 + "_" + fv3 + ".pdf";
    NewFileName = NewFileName.replace(/[\s\!\?\<\>\'\"\*\/\\\=\?\^\`\{\}\|\~]+/g, "_");
    aMyPath.push(NewFileName);
    //save
    mySaveAs(this,aMyPath.join("/"));
    Im still getting the error dialogue box, and nothing shows in my javascript debugger window when I click the button. Seems to be something goofy with my Folder level script:
    var mySaveAs = app.trustedFunction(
         function(oDoc, cPath, cFlName)
              cPath = cPath.replace(/([^/})$/, "$1/");
              try{
                   oDoc.saveas(cPath + cFlName);
                   catch(e){
                                  app.alert("Error During Save");

  • Help with missing/replaced library

    I recently upgraded to iphoto 08. I had all my 07pics so I wanted to save them in my external harddrive to free up space so I made a copy of my iphoto library and saved it to my external hard drive.
    I was recently traveling and did not have my external hard drive with me. I had some new pics I wanted to upload so when I did it said it could not find my library and asked me if I wanted to create one. I said yes and it put all my new pics in my iphoto. When I got back home and hooked up my external hard drive I didnt get any new edits... when I went to look in my external harddrive for my 07 pics...my iphoto library there had been replaced with the new content as well and my 07 pics are missing..?
    Any Idea where my other pictures are and how I can access them.
    I dont think they are gone because I made an imovie using some of those pics and the pics are still availabe in my imovie (but not my library).
    Any help is appreciated... Barbi..

    Barbi:
    It appears that you currently have two libraries, one on your laptop with the most recent photos and the original one on the external HD. To open one or the other launch iPhoto with the Option key depressed, and when asked, select the option to Choose Library. Navigate to the library you want to open and select it. Or you can use the free version of iPhoto Library Manager to quickly move between libraries.
    If you want to copy your photos from the laptop library to the external HD library you can use the paid version of iPLM to do that and that will preserve any keywords, title changes or comments.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Help with Moving Entire Library from one account to another - Same computer

    Ok. I have read and searched but have had little luck with finding info on how to...
    I have 1 computer, an imac. We have two logins and each have a itunes account. How can I move EVERYTHING from one account to the other? I just want to close up one of the accounts and have everything in one place under the same library.
    Any ideas??
    Thanks
    Message was edited by: JSSAUCE for spelling errors

    Hi JS,
    I'm assuming that you simply want to move all of your music from one library to the other and operate iTunes ONLY from THAT library. If this is the case then follow these steps..
    1. Make sure that you place your iTunes Library to be copied into a location where you can access it while logged in from the OTHER account. The only two options you have are the "Public Folder" ~Users/YourUsername/Public or the "Shared Folder" ~Users/Shared. These are the only two folders where you have access when logged into another account.
    To do this open iTunes and go to preferences, selecting the "Advanced" tab and then the "General" tab. You will see the location of your iTunes Music folder and next to it a "Change" Button. Select the change button and a window will appear where you can choose to navigate to the desired NEW location for your Music Library. Once you have navigated to either the "Public Folder" or the "Shared Folder, select "Choose" and your library will be moved to the new location. Before you close the preference window make sure you have "Copy Files to iTunes music Folder when adding to Library" and "Keep iTunes Music Folder Organized" both CHECKED. Now close that window.
    2. Go to the iTunes menu again, this time under the FILE menu, there you will see the option to "Export Library." Click this option and a window will appear with a "Library XML" file highlighted at the top of the window. Change the name if you like or leave it as it is, but make sure you leave the xml at the end. Save this document to your Hard Drive. ( Click on your Hard Drive in the window and save the document there)
    3. Log out of this account and into your second account.
    4. Open itunes and go the Preferences in the menu bar. Again select the "Advanced" tab, and then the "General" Tab. Make sure that the same two boxes are checked. "Add Files to itunes Folder" and "Keep iTunes Folder Organized" Select OK and close the window.
    5. Now go the File Menu in iTunes and "Add to Library." In the pop-up window navigate to the Location of your first account (either your Public or Shared Folder) and select "Open." This will add all of your music from the original account.
    6. Now go back to the iTunes File menu and select the "Import" option. Navigate to the location of the xml file you saved inside your Hard Drive, select it and choose "Open". This will transfer all of your playlists and restore your iTunes library to its exact same state as the first account...
    It took a little while, but that's IT. Now if you no longer desire to use the original iTunes library, just log back into your first account and drag the iTunes Music folder in your "Public" or "Shared" Folder to the trash and delete it. Your new library already holds copies of those files so you won't lose anything.
    Hope this helps you achieve what you desire..
    Regards,
    Ben.

  • Help with iTunes Shared Library (Vista and OS X)

    I am trying to share my Vista-based iTunes library with my new iMac. I have an issue now that iTunes does not let me select the shared iTunes library that resides on the PC. The following is how things are set up
    1) I've moved all of my PC-based music, my iTunes Library (.itl) file and the cover art to an external HD on my Vista PC.
    2) I've set permissions on all of the Vista files (music, library, art) to be read/write for available to all connected users.
    3) I have also mounted the PC-based external drive on my iMac. Permissions seem to be ok, as when I view files via the Finder, they are visable and accessible.
    4) However, when I try to open iTunes on iMac to change the shared library (using the OPTION key), the iTunes Library.itl file on the hard drive is completely greyed out. No matter how I change permissions or sharing on the Vista machine, I cannot seem to select the shared library.
    5) Interesting that I HAVE successfully accessed the same library through another Windows-based machine (Windows XP). In that instance I can access the network drive and select the iTunes Library.itl file no problem. Music streams fine after I do that. Also, from my iMac I am able to create files in the same directory where the iTunes files reside (using program like Text Editor) so it seems I do have write access and permissions to the directory.
    Any clue why this is happening? It seems like iTunes is the one program that is not picking up the permissions from the iMac, but other Mac programs are. It's driving me a little nuts at this point. Any help would be greatly appreciated.
    Thx

    Bump. Same issue. Help please.

  • Help with 'unlocking' iPhoto Library! SO LOST!

    I was a PC user all my life and recently I decided to switch to Mac. I'm still figuring things out and for the most part I've got the hang of it, with one exception...iPhoto. I'm not having problems with iPhoto or using it for that matter, my problem is this; I want to be able to upload photos using Facebooks photo uploader instead of having to upload the entire album using the iPhoto uploader. My next problem is that I just purchased Pixelmator and it won't let me open photos from my iPhoto library. The only photos I can access are the ones from Photo Booth. So, how do I 'unlock' my iPhoto library so that I can actually access my photos? HELP!!!

    To up load selected photos to Facebook (or any other supported service) select the photo(s) and click on the service name in the tool bar - it will create an album in the source pane on the left and up load to the selected service. Any changes made to the album on the service or in iPhoto will be synced so they always stay the same
    TO access your photos in any open/attach window look in the lower left hand corner under media ==> photos ==> iPhoto (*the media browser) - click here for a discussion on the many correct and safe ways to access your iPhoto library photos.
    and it would be a worthwhile investment of time to take the iphoto tutorials - http://www.apple.com/findouthow/photos/ - they are very helpful and will save you a lot of time and frustration.
    LN

Maybe you are looking for