Getting all baked file names

Hi,

I need to make a MEL script to help me carry maya scene files from one computer to another, I need this script to find all the files the maya scene needs. Including textures, referenced files and all the baked stuff. I've been looking throught the Maya help files for 2 days now, and I've found a way to get the texture & referenced files using $Files = file -q -l; but how to get the baked file names? I mean all the baked light maps, shadow maps, animations, fur stuff, etc. etc.? Any help would be much appreciated.
Thanks.

You should organize your files into a "project". Not doing so can cause you a lot of unnecessary problems.

Usualy you have them under your project directory wich is by far the smartest way of doing this. Then ieasiest is just to zip up the entire project directory and send it away. (thisway you dent eveen needt to rename the file in nodes)

if you want to do it via commandline then maya has a nifty -archive flag run mayabatch -archive filename.

though inside maya its not so hard to get all file texture references.

global proc string[] jooAllFileTextures(){
string $out[];
$fileTextures=ls -type file;
for ($fileTexture in $fileTextures){
$out[size($out)]=getAttr ($fileTexture+".fileTextureName");
}
return $out;
}

Yeah, I know they are under the projects directory The problem is that there are many other files in the projects directory, like rendered images (which of course could be easily removed by hand), textures & baked files from other scenes in the project. And if you have to sort them all out by hand, when you just want to move one of all the scenes from that project, then it can get real messy.
In other words, I have been given a precise assginment and this script is the only way to do this.
What about this "mayabatch -archive filename"? Will it sort out only the files needed (and dont forget any) for the specified scene? Or will it archive the whole project directory?
Thanks.

Ahh, sorry, after checking the help I realized I have misunderstood what you said The archive function does exactly what I need except prints it out to the console, which is enough for me this time. Thank you very much!

Always organize your files in a way that you transfer only the topmost project directories. There are certain types of workflow files that '-archieve' will just miss - particle cache for instance.

Yes, after trying some stuff out I found that it also misses photon & gather maps, only reports parts of the depth map filenames and so on... so, I'm still looking for the right solution.

You've already got the "right" solution - transfer the whole project. You can ommit output images directory and unneeded scenes. That's how it's done with maya, like it or not.

You can only guess which files are part of the cache and wich not. it is actualy meant fdor you to use disk servers for those project structures taht need to be shared across networks.

ALso you dont know what dmaps there ere either because there might be a script taht handles this. Its a lot of parsing.

Its easier just to move teh entire directory because theres so much you CAN miss sich as melscripts needed for project eval etc etc. for wich theres no good chekking mechanism.

Ok, thanks, then I'll just have to stick with moving the whole directory...