![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
Create new data folder full path
![](/sites/default/files/styles/thumbnail/public/default_images/Artboard%201_1.png?itok=jeHOCIXy)
bscramer
The function is useful for creating data folders to store globals and temporary waves for user functions.
Function NewDataFolderPath(path[,set])
string path
variable set
variable depth=itemsinlist(path,":"),i
string partial=stringfromlist(0,path,":")
if(strlen(partial)==0) //path is relative, beginning with a :
partial="";i=1
elseif(cmpstr("root",partial)==0) //path is full from root
partial="root";i=1
else //path is relative, with no initial :
partial="";i=0
endif
for(i=i;i<depth;i+=1)
partial+=":"+possiblyquotename(cleanupname(StringFromList(i,path,":"),1))
newdatafolder/o $partial
endfor
if(set)
SetDataFolder $partial
endif
end
string path
variable set
variable depth=itemsinlist(path,":"),i
string partial=stringfromlist(0,path,":")
if(strlen(partial)==0) //path is relative, beginning with a :
partial="";i=1
elseif(cmpstr("root",partial)==0) //path is full from root
partial="root";i=1
else //path is relative, with no initial :
partial="";i=0
endif
for(i=i;i<depth;i+=1)
partial+=":"+possiblyquotename(cleanupname(StringFromList(i,path,":"),1))
newdatafolder/o $partial
endfor
if(set)
SetDataFolder $partial
endif
end
![](/sites/default/files/forum.png)
Forum
![](/sites/default/files/support.png)
Support
![](/sites/default/files/gallery.png)
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More