LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
cancel
Showing results for 
Search instead for 
Did you mean: 

Create Folder with Create if not found option

When developing a Complex LabVIEW Applications, we may need to create N Number of Folders as a part of Configuration information.

This requires the developer to make a check "Check if File or Folder Exists"

Instead of that Create Folder Function can have a Boolean "Optional Input" to create the Folder only if not found in the specified Location and Eliminating the Error when trying to create same folder again.

Hope this will help Smiley Happy

Palanivel Thiruvenkadam,
CLA|| CTD
8 Comments
Proven Zealot

You need to make that yourself. Use File Info to check if the directory is there, and if so(use a case structure) skip the creation.

Active Participant

Yes i do understand that there is a way which i have mentioned in the description, But still then this will make the developers work ease, also when creating a N Number of Folders with Different Folder Structure this will reduce using this Check N Number of Times.

 

Everything will be good if a particular application needs minimal or single path creation/ Folders are in Absolute path. when the case is different we need to find an easy way that what we all trying to do.

Palanivel Thiruvenkadam,
CLA|| CTD
Proven Zealot

I think I just don't get the problem then.

Active Participant

There are several good solutions to this in the public domain.

 

The most popular is probably the OpenG function called Create Dir if Non-Existant. There is also one called Create Directory Recursive in the NI String library.

 

You can install OpenG with the VI Package Manager, or find it here on the LabVIEW Tools Network.

 

 

 

 

 

MTO
Check out ClampOn CAN Monitor on the LabVIEW Tools Network.
Knight of NI

Duplicate: Open/Create/Replace File Function - create file's path if it does not exist


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Knight of NI

And just to finish the thoughts...

I just go ahead and try to create the folder and then use Clear Errors set to only ignore error code 10 (Duplicate File, which is the error you get when you try to create a directory that is already there).  No need to do the check first.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Proven Zealot
Active Participant

Thank you all for your comments.

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Open-Create-Replace-File-Function-create-file-s-path-...

this seemed to be for creating File Path creation which also includes folder options.

 So i thought if create Folder has an option of Boolean to create if not created as same as Queues which will create if not found.

But Still if it doesn't adds value we can go with other options for the same problem.

Palanivel Thiruvenkadam,
CLA|| CTD