Batch re-syn raw data (or batch "review raw data"

Hi brainstorm experts,

We recently have to move all data into a different network drive. I have a few protocols that has ongoing analyses and I "link to raw file". Is there a way to batch re-sync all the raw data (e.g., data path from S:\MEG\xxx to T:\MEG\xxx).

I understand that after the data is preprocessed (the processed data is saved in a different drive), normally I don't use the folder with linked raw data. However, since the analyses are still ongoing and there are too many datasets (N> 100) in each protocol for me to manually fix the broken link. I want to see if there is a way to create a *.m script to loop it through.

Thanks!
Best, Yuhan

There is no easy way to do this.

If you want to keep the links to the original recordings, one option BEFORE moving the database, is to use the menu File > Export protocol > Copy raw files to database.
This would copy all the continuous files as .bst files in the brainstorm_db folder, making the brainstorm_db folder much bigger, but portable.

If this is too late, then you'll have to write your own Matlab script to edit the raw file structures.

Thank you so much for the information! Yes the tips and links you provided are exactly what I need! We can write a script that search and edit the field in the .mat file.

Thanks again!!
Best, Yuhan