PDA

View Full Version : How to check if a path exists


JHN
01-08-2008, 01:46 PM
As the subject, how can I check if a path is available, I found

pathConfig.isLegalPath <path_string>

But it only checks if the string is well formed but doesn't really check the path.

Thanks,
-Johan

PEN
01-08-2008, 02:07 PM
doesFileExist thePath

Works on directories as well. You can also use the dotNetObjects "system.IO.file" and "system.IO.directory" Both have great handling of files and folders.

JHN
01-08-2008, 02:22 PM
Ah yes that's it! Thanks, I'm trying to keep to plain maxscript for simple scripts, saves me the first startup delay:) Will look into dotnet more though!

-Johan

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