LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding subfolder

I have about 2000 subfolders, all named "subfolderXYZ", in a file structure.  I want to find the paths to all those subfolders, and then I will find the path of file with latest timestamp in these subfolders.  Is there a VI out there that I can use, or should I start writing the VI?  Anything similiar to get me started would be nice.  Thanks!

 

 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 7
(2,621 Views)

Recursive File List

Message 2 of 7
(2,609 Views)

I plan to use that vi.  I was just wondering is there anything out there there is already made.  I guess I will start coding.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 7
(2,573 Views)

Also, that VI takes a over a min to run on my file structure.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 4 of 7
(2,571 Views)

Hi jyang,

 

what do you expect with a file structure like yours with 2000 subfolders and maybe several files per folder? Without using a cache it takes some time to check file properties for each file…

Best regards,
GerdW


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

@jyang72211 wrote:

I plan to use that vi.  I was just wondering is there anything out there there is already made.  I guess I will start coding.



That VI IS "already made"!

0 Kudos
Message 6 of 7
(2,560 Views)

@jyang72211 wrote:

Also, that VI takes a over a min to run on my file structure.


How long does it take to manually traverse all files and folders in Windows Explorer?

 

The VI is already made and it is open so you can save a copy of the recursive file list VI somewhere else, then modify it to improve speed.  There maybe features you don't need and can remove to improve speed.  It didn't sound like you cared about the files so keeping a huge array of all the files found might not be needed and removing it could improve performance.

Message 7 of 7
(2,556 Views)