Change Directory


Activation: Hotkey Ctrl-Shift-o.

If you wish to navigate to another directory within ScorBox without opening a file in the target directory, do so by invoking “Change directory;” do not do so by invoking Score’s internal “CD” command, or by following the prompts by pressing the F7 key (in Score 3, that is; I don’t remember the function key sequence for this in Scor4, as I don’t work with it). In order for ScorBox’s “tracking” mechanisms to function, if you wish to change to a directory other than the one with which you launched the current ScorBox session, you have to do so with this macro; otherwise, none of the “plug-ins” (background processes) will function, the “Window selector” for switching between open ScorBox sessions won’t work (see the “Window . . .” page), the “smart NX and NB” functions won’t work, and other functionality may be impaired as well.

LIMITATION. When directories become too deeply nested, Score will fail to launch or to open files in such deeply nested directories. I have never been able to figure out how to quantify these restrictions: at which point is the path information too long? At the moment, I just don’t know – and honestly, I just don’t care. If you know or understand the details of this limitation, please e-mail that information to I am sure that a way can be found for allowing ScorBox access to any directory, no matter how deeply nested or how long the path name is (I have some ideas…). But for the moment, I don’t care enough to undertake researching and constructing a solution (and I do not believe that moving files around temporarily is the best approach to doing that). If you come up with a solution, please submit your process to the e-mail address on the Submissions page.

In any event: if you attempt to navigate to a deeply nested directory, or to a directory whose path definition is too long, the directory change operation will fail. When that occurs, you have to backtrack. ScorBox creates tracking information – i.e. information about the current working directory of your active ScorBox session – within temporary text files in your ScorBox support directory. These text files are called “wrkdir?.txt,” where “?” is a digit signifying which ScorBox sessions the files are associated with. If you attempt to navigate to a directory that is too deeply nested, the process will fail, but the “tracking information” in the relevant “wrkdir?.txt” file will already have been updated. At this point, there will be a discrepancy between what the support file indicates to be your currently active directory and the directory actually recognized by Score.

The solution in that case is navigate back to to a less-deeply nested directory (with a shorter composite path name), thereby updating the associated “wrkdir?.txt” file. None of this is a major concern; simply be aware that due to Score’s internal limitations, this circumstance may arise.

Aside from the macro itself, the support file “getShortPathName.bat” must be placed into your ScorBox support directory, as indicated in User variable “ScorBoxSupportFiles.” “getShortPathName.bat” should be left as is. It is required in order to convert long path names into the 8.3 nomenclature Score’s internal navigation requires.

Within Macro Express, position this macro into General issues:

Posted by Jürgen Selk

initial posting    14 March 2011



Download file:

Macro Express module:

  • Change directory (Ctrl-Shift-o) [SC]

Support file:

  • getShortPathName.bat

To avoid double-postings of macros on this site, this macro and the support file are included on the REQUIRED MACROS page.


Leave a Reply

Your email address will not be published.

Hardcore Music Publishing for the Seriously Committed