LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to search for a config file in a folder & sub folders using Labview 7.1?

Solved!
Go to solution

Hi there,

 

I'm trying to create a VI that will look up a config file in a folder and also search for that file in the subfolders. Unfortunately due to corporate restrictions I am only able to use LabVIEW version 7.1 and I cannot download onto the machine. 

 

I've attempted to look for solutions but I haven't found anything which I am able to do using 7.1. It also doesn't help that I'm very new to using LabVIEW. 

 

Any advice would be appreciated!

0 Kudos
Message 1 of 7
(3,129 Views)
Solution
Accepted by topic author CTech92

Hi CTech,

 

even LV7.1 has (file) functions to list the content of folders.

Use this function to search for files in folders and to collect all subfolders recursively…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,118 Views)

@GerdW wrote:

Hi CTech,

 

even LV7.1 has (file) functions to list the content of folders.

Use this function to search for files in folders and to collect all subfolders recursively…

 


Of course, ver 7.1 did not implement "Native Recursion" so, you are going to need to look at the help file to find examples of recursion in LabVIEW 7.1.  It is possible but I haven't had a 7.1 install in a very long time and wouldn't want to spend the time digging through a help file I don't need.


"Should be" isn't "Is" -Jay
Message 3 of 7
(3,084 Views)
Solution
Accepted by topic author CTech92

Hi Jeff,

 

with "recursively" I meant just a loop where you collect the folders in an array (kept in shift register) and you run the loop until all folders are handled:

check.png

(Rough sketch…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 7
(3,081 Views)

The OpenG File I/O has a List Directory Recursively which is just a while loop recursion.  The oldest version in VIPM works on LabVIEW 6.x and newer. 2.8.2 seems to be the newest version that will work in LabVIEW 7.1.

Message 5 of 7
(3,071 Views)

OK, I was going to contribute these two "pictures" (what's the name of that guy who hates Pictures instead of code?) ...List Directory.png

The second is the function in LabVIEW 7.0 (sorry, don't have LabVIEW 7.1 handy) that you'd put in the Recursive search function, and the first is the Recursive List function that Hooovaah mentioned from OpenG (notice the OpenG = Green color).

 

Bob Schor

Message 6 of 7
(3,068 Views)

Thank you everyone, this is all really helpful!

 

 

0 Kudos
Message 7 of 7
(3,047 Views)