Brain Innovation

support portal


BrainVoyager Available Tools Available Scripts Script to collect file names

Script to collect file names

23-01-15: For use with the protocollinker in BrainVoyager QX 2.8: added a version to write no file paths for the stimulation protocol name.

News 14-10-2014: Finally! There is a BrainVoyager script again to write a list of stimulation protocols (*.prt) and volume time course files (*.vtc) to a text file. This text file can be used with the designmatrixgenerator and the protocollinker.

Download script: filenamecollector.js (zipped) filenamecollector_no_prt_path.js (zipped)


This script can be used to collect file names for the protocollinker or the designmatrixgenerator.

If motion estimate confounds are to be used, please set the variable 'add3DMC' on line 13 to 'true' (without the quotes).


If the script is placed in /Documents/BVQXExtensions/Scripts/, it can be run from the BrainVoyager Scripts menu without opening the editor.


When activated via the Scripts menu or after pressing 'Run' in the Script Editor, the script will present files dialogs to select protocol files (*.prt), volume time course files (*.vtc) and ask for a motion estimates file (*_3DMC.sdm) if 'add3DMC = true'.

It will continue presenting file dialogs until 'Cancel' is selected for a protocol file.

The script will then write a text file for all the filenames selected thus-far. The text file with the filenames will be saved in the directory of the first selected file.

The text file has the following structure:

number of files

prt file 1

vtc file 1

(*_3DMC.sdm project 1)


prt file n

vtc file n

(*_3DMC.sdm project n)

Here is a version of the script that can also ask for two extra confounds (*.sdm/*.rtc): See the header of the file for instructions.

filenamecollector tbv v02

You are here: HomeBrainVoyagerAvailable ToolsAvailable Scripts ≫ Script to collect file names