Programmatically Search for or Create a Directory in LabVIEW

Updated Sep 21, 2018

Reported In

Software

  • LabVIEW Full

Other

File I/O palette

Issue Details

How do I programmatically search for or create a new directory in LabVIEW?

Solution

To search for a directory, use the List Folder VI. This VI is located in the Functions Palette at Programming»File I/O»Advanced File Functions. Wire a Base Path as one of the inputs of the function. This function returns all the files and directories in the base path directory. If you are looking for a particular directory , you can wire the name of that directory to the Pattern input of the List Folder function. Now, search the Folder Names array output to see if it contains the directory name that you are looking for. 

If you would like to create a new directory, use the Create Folder VI. This VI is also located in the Functions Palette at Programming»File I/O»Advanced File Functions.

WAS THIS ARTICLE HELPFUL?

Not Helpful