newb here... i did a forum search and came across a handful of same/similar threads regarding this issue (as early as 2005), but was less successful in finding a solution:
http://www.aenhancers.com/viewtopic.php?f=8&t=988
http://www.aenhancers.com/viewtopic.php?f=8&t=1140
http://www.aenhancers.com/viewtopic.php?f=8&t=295
http://www.aenhancers.com/viewtopic.php?f=8&t=1231
http://www.aenhancers.com/viewtopic.php?f=8&t=283
what we're trying to do is to have a script to iterate all footageItem objects and fix the paths relative to the current user's workspace and operating system. the files referred by the old/new paths are identical.
everything works fine except for dealing with photoshop layer inputs, doing a FootageItem.replace(file) brings in the psd as a single footage and there doesn't seem to be any way to specify a particular layer.

someone suggested using AVLayer.replaceSource(), but I'm not entirely sure how exactly to access the layer data on a FootageItem. accessing app.project.item(index).layer resulted in undefined error... by inspecting the Data Browser i don't see layer as a member of FootageItem...
from the script section of official cs4 help, there is a link to Mr. Lloyd Alvarez's batch search & replace script which also has the same behavior of incorrect psd layer after replacement...
are we SOL? please advise.
thanks very much!