PDA

View Full Version : batch import


DevIII
03-31-2008, 09:55 AM
so I just finished importing 64 layers of illustrator files as splines, and decided i don't like the AI format and might want to use the DWF's instead and was thinking man it sure would be great if i could do this with a simple script instead of by hand. but i have no real experience with max script and the listener wasn't giving me a good head start. so i thought id seek advice from CG society. so
any ideas on how to incremental import multiple files, would be helpful.

coren
03-31-2008, 10:35 AM
some time ago I created this little script that import every file with the given suffix and inside a choosen folder.(sorry for my english)
Hope it will be useful
bye!

dirpath=undefined
theSuffix="*.dxf"
dirpath=getSavePath caption:"choose a folder"

if(dirpath!=undefined)do
(
dirpath=dirpath+"\\"+theSuffix
files =getFiles dirpath
for f in files do (
importFile f #noPrompt

)
)

DevIII
04-02-2008, 10:16 AM
hey corren, sorry for the late reply

thats not working for me. Im going to take the script too someone with more experience in max script later this week and see what he thinks tho, thanks for the starting point. it might be a version differnce sense Im using max 2008, and you wrote that "some time ago" :) hopefully my scripting expert can give me the solution and Ill update this post then.

thanks again.

DevIII
04-02-2008, 10:22 AM
I was having an error due to suffix type, but then it did exactly what I had hoped.

thanks a million you just saved me tons of work

coren
04-02-2008, 01:30 PM
glad to be helpfull!!!

CGTalk Moderation
04-02-2008, 01:30 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.