PDA

View Full Version : reading folder contents with mel


goin
04-30-2006, 09:39 AM
Hi,

I am looking for a solution to read a folder content with mel. Pretty simple - ok! ;-) But the problem is that it works fine on the pc but doesn't work the same on osx.
I use the command "getFileList -fld $myFolder", which returns the overall content of that folder - including file names AND folders. On osx it just returns the file names! But not folder names! Does anyone know what command would be appropriate to do so?

The reason behind all is that I have written a rigging script that is also capable of storing/reading poses and animations. I store the data in a separate folder. Upon script execution it looks for that specific folder in the current project directory. If there is none, the script creates a new folder and stores the data into it.

I have been putting off this problem since it doesn't occur on my pc, but now I need to find a solution since it's supposed to be running on osx ;-) Problem: There is no Mac anywhere near me! ;-)

If anyone knows a solution to that I would really appreciate if he'd share it.

Cheers, Ingo

sauzer
05-03-2006, 01:24 AM
have you tried

getFileList -fld $myFolder -filespec "*.mel";

this should return only the list of files that have extention .mel
Of course, if your files are .somethingElse you will put their extension.

Hope this helps

goin
05-03-2006, 10:36 PM
Hi Sauzer, thanks for your input but today I have tried some new thoughts and it finally worked. Though I needed not to find out about the files in that folder but the names of any subfolders ;-) But anyway I am a happy camper by now even though some new problems came up but I will keep working on them. Thanks again and cheers :-) Ingo

CGTalk Moderation
05-03-2006, 10:36 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.