File Delete Problem

I am choosing to delete files using name filters. The process completes to 100% and then completely stalls brainstorm. I cannot do anything further. And if I force stop the process, the deleted files continue to show up on the brainstorm file structure but have actually been deleted.

This is causing problems for my work. Please look into this.

Regards,
Mayur

What operating system and version of Matlab are you using?

We would need to be able to reproduce the error in order to fix it.
Please create a minimal example that reproduces the behavior and share it with us:

  • Make a copy of your subject (right-click on the subject folder > File > Duplicate subject)
  • Delete all the unnecessary files:
    • in the anatomy: keep only the MRI and the surface you use for source estimation (if applicable)
    • on the functional side: keep only one data file + the associated channel file
  • Use the Pipeline Editor to generate a Matlab script that reproduces the bug (one selection process + one delete process): https://neuroimage.usc.edu/brainstorm/Tutorials/PipelineEditor#Automatic_script_generation
  • Make sure the data file of interest has not been deleted and that you can still display it by double-clicking on it
  • Right-click on the subject folder > Export subject
  • Upload the .zip file somewhere and post the download link here
  • Post the full Matlab scripts here as well

In parallel, you can debug the code yourself to identify which line causes this behavior:

  • Watch introduction videos about the Matlab debugger if you have never used it
  • Put a breakpoint in file file_delete.m at line 41, run your script, then when it stops, use the "step" and "step in" buttons to execute the function line by line - review the variables at each step.
  • Let us know when you have found the offensive line.