From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-22-2014 07:47 AM
Hi everyone,
I was wondering if there are any similar features on LabVIEW that does the job like "dir /b" command on windows cmd. This is to get the files name (in strings) in the directory that I refer it to.
In the end, I want to have a drop-down menu where I can read what files I have in my folder.
Has anyone every done something like this before?
Any answers would be very much appreciated! Thanks a lot!
Stephen
Solved! Go to Solution.
07-22-2014 07:51 AM
Hey,
check on Blockdiagramm :
Programming -> File I/O -> Adv File Functions -> recursive file list.Vi
Regards,
CMW ...
07-22-2014 07:52 AM - edited 07-22-2014 07:53 AM
You could use the List Folder Function to get all file/folder names in alphabetical order from a path to a directory:
Returns two arrays of strings listing the names of all files and folders found in path, filtering both arrays based upon pattern and filtering the filenames array based upon the specified datalog type.
EXAMPLE: You can call it simply with the path and two indicators for files/folder names:
07-22-2014 07:53 AM
Under File I/O -> Adv File Functions -> List Folder
This vi will display all filenames in a subdirectory. I think this should get you going.
Hope that helps.
Adam
07-22-2014 08:02 AM
Thanks everyone for the super fast replies! It works just like I wanted it to.
Thanks again!