HI TPK,
Thanks so mach for your golden replay TPK.
Your script working gook, But one small problem.
@Problem: In Document inside any one blank page and any one image staring in the text frame? Unfortunately script for stopped as previous page (page number not create).
Script Error massage "Object is invalid" (attached screenshot for your reference).
1. Without blank page.

2. with blank page.

Please suggest TPK.
Advance thanks.
try this
for (p=0; p<app.activeDocument.pages.length; p++)
{
try{
app.activeDocument.pages
.textFrames[0].lines[0].insertionPoints[0].contents = "<pg:"+app.activeDocument.pages
.textFrames[0].parentPage.name+">";
}
catch(e){}
}