file list array

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
adamghering
Posts: 22
Joined: April 2nd, 2010, 1:14 am

How do I query a directory and return a list array for the files in that directory?
Adam Ghering
Compositing Supervisor
Legend Films inc.
2D/3D Stereo Conversion
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

Something like:
var files = theFolder.getFiles();

Check the Smart Import script that comes with AE, and the Javascript Tools Guide available here:
http://www.adobe.com/devnet/scripting/
adamghering
Posts: 22
Joined: April 2nd, 2010, 1:14 am

This worked...

I am using it like this

MyFolder= new Folder("//isilon/data/departments/comp/AE_Scripts/Startup/Prefs/");
MyFile = MyFolder.getFiles("*.jsx");
MyScript = MyFile[0];
MyScript.copy("C:\\Program Files (x86)\\Adobe\\Adobe After Effects CS4\\Support Files\\Scripts\\Startup\\"+ MyScript.displayName);
Adam Ghering
Compositing Supervisor
Legend Films inc.
2D/3D Stereo Conversion
Post Reply