About this site

ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.

Related Discussions

"isFolderEmpty" function

Submitted by barigazy on Sun, 2013-12-29 11:02

Does anyone know what is the best way to check if some directory is empty or not.
This fn need to be very "light" for efficient use within a for-loop. I already have a solution but I'm curious if there better solution.
This fn need to have only one argument which represent directory path.
Something like this

You are close.Nice try.
What if you have inside "c:\\test" directory only one folder (not files) and that folder have another folder and so on where last folder only contains files.
Also if you put this fn inside for-loop you will create dotnet class over and over again. That's not so eficient. Try again