Yes I can see this solved using scripts made available from UE13 and beyond. But since JimC is still on UE11 something I have this suggestion:
I think you can get around the problem with two macros:
A) One to run through all documents in a folder with a given extension
B) and one to find the position where current filename is to be inserted and insert current filename.
I will start with the second B). Name it "insertFilename" and enter this macro code:
InsertMode
ColumnModeOff
HexOff
UnixReOff
Top
Find "Program:"
IfFound
Key LEFT ARROW
Key RIGHT ARROW
"
"
CopyFilePath
Paste
Find Up "\"
Replace ""
StartSelect
KEY HOME
Delete
EndSelect
Key BACKSPACE
EndIfReplace
Program: with whatever is needed to find the position in your files where filename should be inserted. Basicly it take the full qualified filename and path from
CopyFilePath and then strips of the path part.
The first A) is an adaptation of one of Mofi's
brilliant macros:
NewFile
FindInFiles "directory" "file type" ""
Loop
Find MatchCase Up "Search complete, found "
IfFound
ExitLoop
Else
NextWindow
EndIf
EndLoop
DeleteLine
Top
NextWindow
CloseFile NoSave
Loop
IfEof
ExitLoop
EndIf
StartSelect
Key END
Open "^s"
PlayMacro 1 "InsertFilename"
CloseFile Save
EndSelect
DeleteLine
EndLoop
CloseFile NoSaveInsertFilename is the call to the B) macro above.
Disclaimer: I have tested this using UE13 and hope it will execute on UE11. Be sure to test it first before executing the macro against your production files.
I hope it is useful for you!
Cheers!
Jorras
Edited by Mofi: Replaced GotoLineSelect 0 1 in macro "insertFilename" with appropriate code because this command is not available in UE v11.x.