Combining different folders with similar starting names

Hi BST community,

Due to my experimental paradigm, I am splitting my EEG recording into different "chunks" as seen by the screenshot below. "5AD13" = participant ID, "s1" = the trial number, and the chunk number follows the trial number. After processing the data I would like to combine the folders so that data from "5AD13_s1" are all merged within a single folder. Therefore there will be no more "chunk" folders. What are your ideas on how to achieve this? For further information, I have added another screenshot below that displays the type of data that is present in each folder.

Many thanks for your time in advance :slight_smile:

image

image

You can select the studies that you want to merge, then right-click > Group folders

Also during importing you could select Create a separate folder for each event type.
Then importing from different chunks will go to the same folder (with the same name as the imported event name)


In the first screenshot it seems that all the Folders belong to the same Subject, is that the case?

Thank you very much for that idea Raymundo - it's working nicely.
Is there a way to access "Group folders" through a script and/or pipeline editor as a process?

And yes all the folders belong to the same Subject.

The function is be db_group_conditions( ConditionsPaths, newConditionName )

  • ConditionsPaths is a cell array with Folder information as Subject/FolderName
  • newConditionName is a string with the name of the new Folder

Be careful as there is not undo after grouping folders.

I was curious as they have different participant IDs

1 Like

Thank you for this reply Raymundo :slight_smile:

Ah yes, for the ease of file manipulation I just decided to pull data under one subject folder.

@Raymundo.Cassani
Hello Raymundo, sorry to bring this topic up again but I just realised that when you "right-click > Group folders" the information of BAD TRIALS is lost during the process.
That is, if you have Folder X with 2 good trials and 1 bad trials and Folder Y with 3 good trials and 2 bad trials the combined foldder Z will have 8 good trials NOT 5 good trials and 3 bad trials (which is what I expected).
Is there a way to prevent this from happening?

Indeed this was unexpected and undesired. It is now fixed at 4503bb4
Please update your Brainstorm instance