Hey guys I made a python application to batch archive After Effects files and in doing so I had to write my own collect function. I thought it might be useful for some other people too so I'm throwing it up here if you want it. I made it as clean and robust as I could, and added lots of comments.
I'm on AE CS6, Windows 7 and it works great so far. If you're on another version or OS I think it should work fine, I just haven't tested it.
I started with a script I found here. However in testing it out I found a few bugs and some limitations, so I decided to write my own (and in English!). The only drawback from the native Collect Files feature is that due to limitations in extendscript I can't figure out how to work around, I was not able to relink layered photoshop and illustrator files. However they are still copied into the collect folder and I warn the user that they will need to relink these by hand.
Feel free to let me know of any bugs and I'll try to handle them! I want this to be as bullet-proof as possible so I can sleep at night knowing I'm not missing any files