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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error on function create folder

Solved!
Go to solution

Hi there,

 

I am trying to create a file path with folders named to some information relevant to my program like serial number and number of order. ex: c:\calib\LX2345\123456. my code is working and the program generates the path i want but if the path or some folder already exist it gives error of duplicated path. i want that in those situations the program ignores the creation of the folders and use the same path and overwrite the saved tdms file.

 

config.png

0 Kudos
Message 1 of 3
(2,474 Views)
Solution
Accepted by topic author asnaev

Do something like this, just wire path and error wire through the true case.

 

Ben64

 

create folder.png

 

 

Message 2 of 3
(2,470 Views)

Your two options are to 1) first check to see if the folder already exists as ben already pointed out or 2) clear the error if you get that error code (I don't remember the code at the top of my head).

 

I have a VI in my library that will clear a specific erorr.  I use this VI to clear the error if the folder already exists.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,461 Views)