Delete folder

Hi friends,

I have some problem, i need delete folder but not have code in maxscript for this.

:(

 PS: they had understood? my english is very very badEmbarassed

 

 

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
3dwannab's picture

HiddenDOSCommand

Lets not forget the HiddenDOSCommand which runs in the background. No annoying flash on your screen.

slimatron's picture

folder deletion

Even neater, try the dotnet method:

fileClass = dotNetClass "System.IO.Directory"
fileClass.Delete @"c:\directoryName" true

true sets the deletion to recursive so you delete all the files and subfolders
simples...

barigazy's picture

ei.

fn deleteFolder folderPath: =
(
	local sioDir = dotNetClass "System.IO.Directory"
	if (SIODir.Exists folderPath) do SIODir.Delete (folderPath) true
)
--example
deleteFolder folderPath:"c:\\temp\\TestFolder"

bga

arketip's picture

You could try the

You could try the DOSCommand()
Something like this:

DOSCommand "rd c:\\theFolder"

Don't forget to use a double \\ in the path name because the command is a filename string

Aline3D's picture

 wowww.. very tanks friend

 wowww.. very tanks friend Wink

this is!!

 

 

AlineLima
Script Developer - SeagullsFly
www.seagullsfly.com
Brazil

AlineLima
Script Developer - SeagullsFly
www.seagullsfly.com
Brasil

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.