LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create a folder if it is non-existent

Hello,
I would like to create a repertory if it is non-existent.
Is this somebody has an example?

Thank you

"I'm sorry for my English, I do not speak it well"
0 Kudos
Message 1 of 6
(9,856 Views)
Look in File I/O>>Advanced File Functions. There are two functions, "List Directory" and "New Directory" which will allow you to do what you want. First search a location for the subdirectory and if it does NOT exist create it using "new directory" these VIs are nice and even allow you to set privledges and attributes. Hope tis helps

-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 6
(9,848 Views)
Thank You, for your help.

my program goes to wonder

Mickaël
0 Kudos
Message 3 of 6
(9,841 Views)
falkpl wrote:

> Look in File I/O>>Advanced File Functions. There are two functions,
> "List Directory" and "New Directory" which will allow you to do what
> you want. First search a location for the subdirectory and if it does
> NOT exist create it using "new directory" these VIs are nice and even
> allow you to set privledges and attributes.

An even simpler solution: Just execute the "New Directory" function and
ignore any error returned.

Or more correctly, use "File Info" and look at the error code. If no
error is returned and the directory output is true, you are fine. No
error and directory output is false means you have a conflict with a
file already existing. An error output means you can go and try to
create the dir.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 4 of 6
(9,826 Views)
How do you ignore the error message as it termnates my program and tells me there is a duplicate directory??
0 Kudos
Message 5 of 6
(9,755 Views)
DOH, add an error indicator!!!!!! Sorry
Message 6 of 6
(9,750 Views)