
Create new data folder full path

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

Forum

Support

Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More