Hi,
I hope, I understand what you're trying to accomplish... so try:
exiftool "-iptc:Caption-Abstract<$directory/$filename" c:\xx
-this will write into each file (inside c:\xx directory) it's path and filename.
After you're sure this is what you want, you can use -r option (recursive):
exiftool "-iptc:Caption-Abstract<$directory/$filename" -r c:\xx
-which will do the same for all underlying directories (that is, subdirectories of c:\xx).
To prevent making of (_original) backups, use -Overwrite_original option.
Above is for Windows usage -if you're not on Windows, then you should use single quote instead.
Notice: On Windows, directories are (visualy) separated by backslash... but when exiftool executes above command, normal (not back) slash is written. Not a big deal, though.
Greetings,
Bogdan