AdoptFiles
AdoptFiles [ flags ]
The AdoptFiles operation adopts external files and waves into the current experiment.
When the experiment is next saved, the files and waves are saved in the experiment file for a packed experiment or in the experiment folder for an unpacked experiment. References to the external files are eliminated.
AdoptFiles cannot be called from a function except via Execute/P.
Flags
| /A | Adopts all external notebooks and user procedure files and all waves in the experiment. WaveMetrics Procedure files are not adopted. /A is equivalent to /NB/UP/DF. | |
| /DF | Adopt all waves saved external to the experiment. | |
| /DF=dataFolderPathStr | Adopt all waves saved external to the experiment that are in the specified data folder. | |
| /I | Shows the Adopt All dialog and adopts what the user selects there. | |
| /NB | Adopts all external notebook files. | |
| /UP | Adopts all external user procedure files. | |
| /W=winTitleOrName | Adopts the specified notebook or procedure file. /W was added in Igor Pro 7.02. | |
| winTitleOrName is a name, not a string, so you construct /W like this: | ||
/W=$"New Polar Graph.ipf" | ||
| or: | ||
/W=Notebook0 | ||
| When working with independent modules, winTitleOrName is a procedure window title followed by a space and, in brackets, an independent module name. See Independent Modules for details. | ||
| /WP | Adopts all WaveMetrics Procedure procedure files. | |
| /WV=wave | Adopts only the specified wave. | |
Details
Only files and waves saved external to the current experiment are adopted. See References to Files and Folders for a discussion of such standalone files.
The number of objects actually adopted is returned in V_Flag.
To adopt just one wave, use:
AdoptFiles/WV=wave
To adopt just one notebook or procedure window use AdoptFiles/W=winTitleOrName.
Command Line and Macro Examples
// Using AdoptFiles from the command line or from a macro
AdoptFiles/I // Show the Adopt All dialog.
AdoptFiles/A/WP // Adopt everything that can be adopted.
AdoptFiles/DF/NB/UP/WP // Adopt everything that can be adopted.
AdoptFiles/DF=root:subfolder // Adopt any externally saved waves in root:subfolder.
AdoptFiles/W=$"Proc0.ipf" // Adopt Proc0.ipf if it is saved externally.
AdoptFiles/WV=GetWavesDataFolder(wave0,2) // Adopt wave0 if it is saved externally.
Function Examples
// Using AdoptFiles from a user-defined function - you must use Execute/P
Execute/P "AdoptFiles/A" // Schedule adoption of all user files and waves
Execute/P "AdoptFiles/WV="+GetWavesDataFolder(w,2) // Schedule adoption of wave w
See Also
Adopt All, Adopting Notebook and Procedure Files, Avoiding Shared Igor Binary Wave Files, Operation Queue.