Find/Replace Text Batch Process Keyin Active Filename

I have a keyin/script/batch process question. I am running Microstation V8i SS3. I am trying to create a simple keyin command file that will find/replace a string of text in my sheets with the active filename.  I have gotten this to work for me in the past but I misplaced my script file.txt . Pretty much want to be able to replace "XYZK" with activefilename.dgn. Below is what I'm working with in a batch process, which is only replacing "XYZK" with "$(filename (_dgnFile))" rather than returning the active file name.

MDL KEYIN FINDREPLACETEXT
FIND DIALOG SEARCHSTRING XYZK
FIND DIALOG REPLACESTRING $(filename (_dgnFile))
CHANGE TEXT ALL

Any help would be appreciated! Thanks!