LC #42 Pipers Alley

View Full Version : How to check if a path exists

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.


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

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

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!


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.