LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Searching a file in multiple folders

Solved!
Go to solution

Hi:

 

Im trying, to find a way to search, a file stored in different subfolders of a main folder, and copy, i mean i have a VI which makes a folder everyday (the name istoday date, or yesterday date), and inside that folder is a serial1.txt log file, but yesterday (for axample) the same log file (serial1.txt) was generated, how can i search in lab view all of those serial1.txt files?? By putting just in the search field, the main folder name??? 

And I want to copy each of these serial1.txt, to different paths???

 

Any Idea??? 

0 Kudos
Message 1 of 6
(5,010 Views)

Hi,

 

          To search files from any folder you can use List folder function which also list files under it.you can find this function in File I/O>Advanced File Functions>List Folder and to copy the files you can use copy function. Hope this helps.

0 Kudos
Message 2 of 6
(5,001 Views)
Solution
Accepted by topic author LKCH9
yes with the list folder, i can search files in a main folder, but thats all, i mean if i have a main directory with a subdirectory the file list function, just show the files at the main directory, or im worng???     
0 Kudos
Message 3 of 6
(4,972 Views)
You didn't say which version of LabVIEW you are using, but the newer versions (I think it was introduced in 8.2), there is a VI called Recursive File List which is on the Advanced File Pallette.  If you have an older version, you'll either have to take the directories output of the main directory listing, and add it to an array of directories to be checked (this is actually what the NI Recursive FIle List does), and just process that array until you've searched every subdirectory.
Message Edited by Matthew Kelton on 12-01-2008 08:59 AM
0 Kudos
Message 4 of 6
(4,939 Views)

See the Recursive File Nugget here for doing the recursive search in earlier version of LV.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(4,932 Views)

OpenG offers a Recursive File list VI for LabVIEW 6 and up.

 

 

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 6
(4,927 Views)