Skip to main content

GetWavesDataFolder

GetWavesDataFolder (waveName, kind)

The GetWavesDataFolder function returns a string containing the name of a data folder containing the wave named by waveName. Variations on the theme are selected by kind.

The most common use for this is in a procedure, when you want to create a wave or a global variable in the data folder containing a wave passed as a parameter.

GetWavesDataFolderDFR is preferred.

Details

kindGetWavesDataFolder Action
0Returns only the name of the data folder containing waveName.
1Returns full path of data folder containing waveName, without wave name.
2Returns full path of data folder containing waveName, including possibly quoted wave name.
3Returns partial path from current data folder to the data folder containing waveName.
4Returns partial path including possibly quoted wave name.

Kinds 2 and 4 are especially useful in creating command strings to be passed to Execute.

Examples

Function DuplicateWaveInDataFolder(w)
Wave w
DFREF dfSav = GetDataFolderDFR()
SetDataFolder GetWavesDataFolder(w,1)
Duplicate/O w, $(NameOfWave(w) + "_2")
SetDataFolder dfSav
End

See Also

Data Folders