here is a python script that is a bit shorter :)
---
extension = ".tga"
currentProject = Application.ActiveProject3
newFile = open("%smyFiles.txt"% (currentProject.Path + XSIUtils.Slash), "a")
newFile.write("\n".join([ eachFile.ResolvedPath for eachFile in
currentProject.ActiveScene.ExternalFiles if extension in eachFile.Name]))
newFile.close()
---
Best,
VladimirOn Wed, Jan 22, 2014 at 9:09 AM, gareth bell <[email protected]> wrote: > Or this if you want a new line for each file: > > > xsi = Application > > extension = ".psd" > listOfFiles = [] > > currentProject = xsi.ActiveProject > > for eachFile in xsi.ActiveProject2.ActiveScene.ExternalFiles: > if extension in eachFile.Name: > listOfFiles.append(eachFile.Name) > print eachFile > > for eachPSD in listOfFiles: > newFile = open(str(currentProject) + XSIUtils.Slash + > "myListFile.txt", "a") > newFile.write(str(eachPSD) + "\n") > newFile.close() > > > ------------------------------ > From: [email protected] > To: [email protected] > Subject: RE: list of external files > Date: Wed, 22 Jan 2014 14:03:39 +0000 > > > would this work? > > > xsi = Application > > extension = ".psd" > listOfFiles = [] > > currentProject = xsi.ActiveProject > > for eachFile in xsi.ActiveProject2.ActiveScene.ExternalFiles: > if extension in eachFile.Name: > listOfFiles.append(eachFile.Name) > print eachFile > > > newFile = open(str(currentProject) + XSIUtils.Slash + "myListFile.txt", > "w") > newFile.write(str(listOfFiles)) > newFile.close() > > ------------------------------ > From: [email protected] > Date: Wed, 22 Jan 2014 14:19:48 +0100 > Subject: list of external files > To: [email protected] > > Hi guys, is it possible to pull a list of external files from a scene that > contain only the extension .psd for instance and write it somewhere to disk. >

