ScriptSpot

Forum topic · General Scripting

Delete folder

By Aline3D · 2007-02-28

Description

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 bad😳

 

 

Comments (5)

HiddenDOSCommand

3dwannab · 2014-09-14

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

folder deletion

slimatron · 2013-02-25

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...

ei.

barigazy · 2013-02-25


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

arketip · 2007-03-01

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 · 2007-03-01

 wowww.. very tanks friend 😉

this is!!

 

 

AlineLima
Script Developer - SeagullsFly
www.seagullsfly.com
Brazil