Station 1 · Lesson 5

.set and .fdt files

Recommended8 minBefore this lesson: The EEG structurePrint the card
Starts from: eeglab_data.set (D1) · Nothing yet: the data as downloaded.Download the data (opens in a new tab)
Script to reach this state
MATLAB
[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;
sampleFolder = fullfile(fileparts(which('eeglab')), 'sample_data');
EEG = pop_loadset('filename', 'eeglab_data.set', 'filepath', sampleFolder);
[ALLEEG, EEG, CURRENTSET] = pop_newset(ALLEEG, EEG, 0, 'setname', 'Continuous EEG Data', 'gui', 'off');
eeglab redraw;

The idea in brief

An EEGLAB datasetOne EEG data file loaded in EEGLAB together with its information. has two parts: the description (channelThe signal recorded from one electrode, as shown in EEGLAB. names and positions, events, sampling rateThe number of samples recorded per second on each channel., processing history) and the signalValues that change over time, such as the voltage recorded on a channel. itself (the numbers in EEG.data).

Before and after

On the left, the sample_data folder holds two files with the same name: eeglab_data.set (about 0.35 MB) with the description and eeglab_data.fdt (about 3.9 MB) with the 32 × 30504 signal. On the right, your lessons folder holds the same pair, D1_copy.set (about 0.35 MB) and D1_copy.fdt (about 3.9 MB), with the label: same name, same folder, and below them the line: this is how EEGLAB 2026.1 saves.

Your next questions, each answered in its own section:

Why do I need this step?

The reasons in detail, and the terms you need

In EEGLAB 2026.1, saving writes the two parts to two files with the same name by default: a .set file with the description and a .fdt file with the signal. The sampleA single value of the signal at one point in time. eeglab_data.set that ships with EEGLAB is saved the same way. You can also ask for one file that holds both parts.

A .set without its .fdt has no signal. If you copy or send the .set file alone, the person who tries to open it gets an error. This lesson shows how to tell the two cases apart and how to keep the two files together.

How do I do it in EEGLAB?

9 steps in the menus

1. See the two files of the sample

  1. Open the sample_data folder inside your EEGLAB folder, in File Explorer on Windows or Finder on macOS.
  2. You will find eeglab_data.set (about 0.35 MB) and eeglab_data.fdt (about 3.9 MB). The .fdt is the larger one because it holds the signal: 32 channels × 30504 samples × 4 bytes per number.

2. Save a copy in your folder

  1. With eeglab_data.set open in EEGLAB, open File then Save current dataset as.
  2. Go to your own lessons folder, not sample_data, and type the name D1_copy.set.
  3. Click Save.
  4. Look in your folder: there are two files, D1_copy.set (about 0.35 MB) and D1_copy.fdt (about 3.9 MB). You typed one name, and EEGLAB wrote both files.

3. Find the saving option

  1. Open File then Preferences.
  2. In the first group of options, find the checkbox that starts with If set, save not one but two files for each dataset (header and data).
  3. Close the window with Cancel, and do not click OK. In this course we keep the default: two files.

You may find the checkbox unticked, even though EEGLAB just saved two files. The window reads its value from one settings file, while saving follows another one, until you click OK in this window for the first time. After that, saving follows the checkbox.

How do I write it as code?

The same steps in 15 lines of MATLAB
MATLAB
% Start EEGLAB and load the sample dataset
[ALLEEG, EEG, CURRENTSET, ALLCOM] = eeglab;
sampleFolder = fullfile(fileparts(which('eeglab')), 'sample_data');
EEG = pop_loadset('filename', 'eeglab_data.set', 'filepath', sampleFolder);

% The sample keeps its signal in a separate file
EEG.datfile                                 % 'eeglab_data.fdt'
dir(fullfile(sampleFolder, 'eeglab_data.*'))   % the .fdt and the .set

% Save a copy in your own folder: two files by default in EEGLAB 2026.1
myFolder = 'C:\Users\me\Documents\eeg-course';   % change it
EEG = pop_saveset(EEG, 'filename', 'D1_copy.set', 'filepath', myFolder);
dir(fullfile(myFolder, 'D1_copy.*'))           % D1_copy.fdt and D1_copy.set

% Ask for one file explicitly, if you need it
EEG = pop_saveset(EEG, 'filename', 'D1_onefile.set', 'filepath', myFolder, ...
    'savemode', 'onefile');
dir(fullfile(myFolder, 'D1_onefile.*'))        % D1_onefile.set only, about 4 MB
  • EEG.datfile holds the name of the .fdt file. When it is empty, the signal is inside the .set file.
  • 'savemode', 'onefile' forces one file for this save only, whatever the preference says. 'savemode', 'twofiles' forces two files.

Which value should I choose?

Suitable values for your analysis goal
ChoiceWhenWhat you get
Two files (the default in 2026.1)Almost always, and with a STUDYAn EEGLAB structure that groups many participants' datasets for joint analysis. in station 8, because EEGLAB reads the description alone quickly.name.set and name.fdt, always together
One file (untick the option in File then Preferences and click OK, or 'savemode', 'onefile')You want to email one dataset or copy it without forgetting a file.name.set only

Resaving keeps the format on disk. File then Resave current dataset(s) on a two-file dataset writes two files again, even if your preference is one file. In that case the Command Window prints a note starting with Note that your memory options for saving datasets does not correspond. This is normal.

Two files, not one

Some pages of the EEGLAB documentation say that EEGLAB saves one file by default since 2021, and the File then Preferences window says so too. But the settings file that ships with EEGLAB 2026.1 turns the two-file option on, so saving writes two files. Trust what you see in your folder.

How do I check it worked?

4 quick checks
  1. sample_data has eeglab_data.set and eeglab_data.fdt, and EEG.datfile gives 'eeglab_data.fdt' after loading the sample.
  2. Your folder has D1_copy.set (about 0.35 MB) and D1_copy.fdt (about 3.9 MB).
  3. If you ran the scriptA MATLAB file of commands that runs processing steps in order.: D1_onefile.set alone, about 4 MB.
  4. D1_copy.set opens with File then Load existing dataset and shows 32 channels and 154 events.

You can delete D1_copy.* and D1_onefile.set after the lesson. The next lessons do not use them.

What mistakes do people make?

6 mistakes and how to avoid them
  • Copying or emailing the .set file alone. Always move both files, with the same name, into the same folder.
  • Renaming one of the two files in the file explorer. The .set file remembers the name of its .fdt. To rename a dataset, open it in EEGLAB and use File then Save current dataset as with the new name.
  • Opening the .fdt file. Always open the .set. EEGLAB reads the .fdt with it.
  • An error that starts with file and ends with you must also rename/move the associated data file. The .fdt file is not next to the .set file, so the dataset does not open. Find it and put it in the same folder. The sample eeglab_data.set is an exception: EEGLAB puts the sample_data folder on the MATLAB path, so MATLAB finds eeglab_data.fdt there even if you copy the .set alone. Your own files are not treated this way.
  • Clicking OK in File then Preferences by accident. If the two-files checkbox is unticked, saving then writes one file. That is fine, but do not be surprised when your files change.
  • Being surprised that the old .fdt disappeared. If you save a two-file dataset as one file with the same name in the same folder, EEGLAB deletes the old .fdt, because the signal is now inside the .set file. It prints Old .fdt file detected on disk, deleting file since the Matlab file now contains all the data. This is why you save your copies in your own folder, never over the sample.

Where can I read more?

1 sources, official docs first
  • EEGLAB TutorialDocumentation3. Dataset management: Saving a dataset; Dataset and file preferences

Written for EEGLAB 2026.1 · 2026-10-28

Need help?

Ask, share feedback, or report an error