Losing channel information when moving files

Hi,

I tried moving my imported EEG files into a new folder under the same subject from the imported folder. I used the function process_movefile.m for that. But the moved folder neither has the channel file nor any channel information (screenshot attached). Adding the channel file again manually is not working properly as well, due to the modified channel names.

Is there a way that I can make sure that the channel file also gets copied while moving the file?

Thanks in advance,
Sainath Murali

That is right, the process_movefile only moves a file, the moving does not propagate to its channel file nor to its parents (if any).

You can try one of the following methods to have the channel file in the NewFolder:

Method A

  1. Use the process_movefile
  2. Manually copy the channel file from the original directory to the new directory
  3. Reload new folder (right-click > Reload), or use db_reload_studies(iStudy)

Method B

  1. Use the process_movefile
  2. In the Protocol GUI, Ctrl-C and Ctrl-V the channel file

Hi Raymundo!

Moving files still has some issues. I moved the raw files under a subject to a new folder under the same subject for better organization. After the files were shifted, I deleted the original files. When I tried to open the moved files, it threw an error (image attached). I'm not able to open any of the moved files now. Will moving raw files only link the moved files with the original files?

Thanks in advance,
Sainath

Hi @sainath, I tried to reproduce this issue, but it seems to be working properly, this is what I did:

  1. Copy raw files to database. File > Export protocol > Copy raw files to database
  2. Close Brainstorm
  3. In /ProtocolName/data/Subject01, I created a copy of the @rawoldname_, and rename it to @rawnewname
  4. Start Brainstorm, and reloaded Protocol (right-click on the highest node in the tree > Reload)
  5. Opened the Link to raw file inside the (raw) newname folder
  • In the shared error, is that path the old or new path?
  • Could it be that there was an issue with moving the file?

Hi @Raymundo.Cassani,
Sorry for not explaining the issue properly. I moved the files through Brainstorm GUI by selecting the required folders (like in the Image1 attached) in the process tab followed by Run > Files > Move files and entered the folder name that I created new under the subject (Image2). Finally, after moving the files ended up like in Image3. I did not move manually outside brainstorm.

Image1:


Image2:
gnome-shell-screenshot-6ymbdw
Image3:
gnome-shell-screenshot-98go7

Thanks for the clarification. I can replicate the issue the new link-to-raw file is linked to the location of the raw file, as this is expected, as only the link was moved. Although, I cannot replicate the fact that there was a change of the type of file, from 'raw' (1st image) to 'imported' data (3rd image).

This is an undesired behaviour as to begin, links to raw files should not allowed to be moved (corrected at edd9d3e).

Regarding the shared screenshots, the approach of moving multiple link-to-raw files to the same folder is not recommended, each link to a raw file should have its own folder. If the different raw files correspond to the same recordings sessions, a better approach is be to first link them in Brainstorm, and then concatenate them. See Merge two raw data files

If the goal is such arrangement is to clean the database. If they are not needed, the first link (_mi_left) and all the intermediate raw folders (raw files and links) can be removed (_mi_left_bl, _mi_detrend, _mi_detrend_notch).

Thank you for the explanation. I was expecting it to throw an error when I tried to move the raw file. As it ran without any error, I thought it was possible.
Regarding the 3rd picture, they are still raw files grouped together.
gnome-shell-screenshot-3fgwh1

Now the process will not even show for raw files :wink:

Oh! Interesting, I did not know they were also grouped
(as there should be only one raw file per raw condition)