LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Steve_TDiode

Copy file function create non-existing folder path

Status: New

The Copy function when used to copy a file to a folder that does not exist will generate error 7.  Having an option (an input to the Copy function) to create the folder path leading to the file to be copied is desired.

4 Comments
crossrulz
Knight of NI

Similar idea (NOT a 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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
ConnerP
Member

For anyone else that may come across this issue, the OpenG Toolkit offers a pretty quick solution to this problem

 

ConnerP_0-1673353916000.png

 

crossrulz
Knight of NI

You don't even need the OpenG Toolkit.  You can just use the Create Directory primitive to create the folder.  But do note that this primitive will return error 10 if the folder already existed.


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
ConnerP
Member

You are right. I did not realize the primitive also handled multiple levels of non-existing directories. I guess it does say right in the detailed help "This function creates all folders that do not already exist in the specified path". RTFM I suppose...