Imports one or more data files from a source folder to the current Labbook.
"fpath", "filespec", "hedfiles", overwrite, resethead, silent, skiphead) |
"fpath" |
- |
A string. The source folder. |
||||||||
"filespec" |
- |
Optional. A string, a list of comma separated files to process, can include wildcard characters such as * and ?. If not specified or "", defaults to all the files in fpath. |
||||||||
"hedfiles" |
- |
Optional. A string, the header file names separated by commas. If not specified or "", the header file for each file name is the file name with extension .hed. The header file is ignored if it does not exist. |
||||||||
overwrite |
- |
Optional. An integer, the overwrite mode if the series already exists.
|
||||||||
resethead |
- |
Optional. An integer, reset header values to defaults after import.
|
||||||||
silent |
- |
Optional. An integer, suppress import messages.
|
||||||||
skiphead |
- |
Optional. An integer, skip embedded header values in file.
|
importselect(gethome + "data", "impsin.dat, impsqr.dat, imptri.dat")
imports the files impsin.dat, impsqr.dat and imptri.dat into the current Labbook. The associated header files impsqr.hed and imptri.hed override the header information in impsqr.dat and imptri.dat. As specified in the header files, the files are imported into the Dataset Imported.1. Existing series are overwritten.
importselect(gethome + "data", "imp*.dat")
Same as above except all files that match imp*.dat are selected resulting in the import of the files imprtsqr.dat, impsin.dat, impsqr.dat and imptri.dat into the current Labbook.
importselect(gethome + "data", "imp*.dat", 2)
Same as above except the imported data is appended to existing series in Dataset Imported.1.
copyfile(gethome + "data\imp*.hed", getmiscpath(1, 1) + "MyImportFolder");
copyfile(gethome + "data\imp*.dat", getmiscpath(1, 1) + "MyImportFolder");
importselect(getmiscpath(1, 1) + "MyImportFolder", 0);
Copies all imp* header and data files to a temp folder named MyImportFolder. All of the files in the folder are imported.
IMPORTSELECT is a non-GUI version of the built in multi-file import facility.