Dear zliazmei,
The below VisualLISP code inserts a text object containing
the filename and filepath of the current drawing at the position 0,0 . Just follow the constructions.
1. Copy the below expressions and paste them into a text
file.
2. Save the file with the name FF.LSP .
3. Enter the AutoCAD environment and load the saved file
using the command "APPLOAD".
4. Enter FF at the command line.
(defun c:FF(/ acadObject acadDocument
documentPath documentName)
(vl-load-com)
(setq acadObject (vlax-get-acad-object))
(setq acadDocument (vla-get-ActiveDocument acadObject))
(setq documentPath (vla-get-Path acadDocument))
(setq documentName (vla-get-Name acadDocument))
(command "._TEXT" '(0 0) "" ""
(strcat documentPath "\\" documentName))
(princ)
)
Notice: If the current text style has a default height not equal to zero, the above program will interrupt and has no output.
If you want to run the program automatically every time you open a drawing, you can add the above code in file acaddoc.lsp (in the function s::startup).
In case of any doubt don't hesitate to be in touch with me using the present web page.

Farzad