LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

List Folder Function returns Error 13

So I want to implement List Folder Function so that Labview will browse the files in a folder for a specific keyword that the user inputs. But when I run the VI, for one it gives me Error 13 (something about it can't find the dynamic library), and two it only seems to allow me to select individual files and not the folders. So any suggestions here? 

 

The code is attached here, and don't mind the clutter. Not all of it is for the List Folder Function. Go to the Event Structure and find the event for "Searching", the List Folder Function code is in there. Thanks.

0 Kudos
Message 1 of 5
(2,852 Views)

You pass the incorrect path to List Folder function. It should end with a folder, not a file. Look at this similar topic for details: https://forums.ni.com/t5/LabVIEW/Error-13-occurred-at-List-Folder-in-temp-vi/m-p/3221337#M935889

Message 2 of 5
(2,820 Views)

Okay, that got rid of the Error 13, but my code still doesn't work. When I type something in the input string and press the search button, nothing shows up in the array. 

0 Kudos
Message 3 of 5
(2,815 Views)

I'm looking for it to display a list of files that have the search term I've entered in them to be displayed in the array. Am I going about this the right way?

0 Kudos
Message 4 of 5
(2,814 Views)

This works for me this way:

2017-07-09_16-49-42.jpg

Here the pattern is "di*", that means files and folders with the name starting with "di". It's standard Windows pattern, so you have to use * or ? to filter out the names.

 

Well, if I had your task I'd get all files / folders with List Folder and filter their names on my own in the code (not using this pattern approach). But you may use your method if you want.

Message 5 of 5
(2,807 Views)