Im not sure what you mean by this… This should reset the active doc thumbnail back to the renamed folder…
#target bridge
app.bringToFront();
var orgName = app.document.thumbnail.spec.name,
orgPath = app.document.thumbnail.spec.path,
newName = '_' + orgName;
app.document.thumbnail.spec.rename( newName );
var newThumb = new Thumbnail( Folder( orgPath + '/' + newName ) );
app.document.thumbnail = newThumb;
I can't believe I found it, but it works and it is simple.
At the same time, I spent 2 years using Bridge the wrong way and if I had an Adobe Bridge dev here, I wouldn't be very happy.
Why Adobe simply can't give straight and direct answers like this case?
When i rename a app.document.presentationPath, I usually returned to its parent folder on first place and then refresh() this one.
Then I would go back to the new renamed folder.
Problem:
The 'Content' panel was OK and refreshed but the 'Folders' panel was not: the last non-renamed folder was still there and I always needed to close its parent folder on 'Folder' panel, click F5, and reopen making that ghost folder to disappear.
The solution is simple and logical but sadly it took 2 years for me to solve it.
I only needed to start dealing with the node string containing a fully qualified Bridge URI (uniform resource identifier).
For example:
var origin = Folder(app.document.presentationPath);
var renamedFolderName = 'v_'+ Folder(app.document.presentationPath).name;
app.document.thumbnail = new Thumbnail(new Folder(app.document.presentationPath).parent); // back to parent folder
//
Folder(origin).rename(renamedFolderName ); // renaming
app.document.thumbnail.refresh(); // refreshing the parent folder
app.document.thumbnail = new Thumbnail(new Thumbnail(Folder(Folder(origin).parent + "/" + renamedFolderName ).fsName).uri); // the uri is the node (fully qualified Bridge URI)
And... the 'Folders' panel was updated correctly and the ghost folder vanished!