Delete a folder

(imported topic written by RHSteeleOH91)

How do I write this in action script?

Basically asking if a folder exists then delete it.

If Exist C:\INSTALL\SEP11*.* RD /S C:\INSTALL\SEP11 /Q

I’ve tried this and it fails. Is it case sensitive?

//Deletes Old SEP Installation folder(s) if exists

IF {(exists (descendants whose (name of it contains “SEP11”) of folder “C:\Install”))

delete “C:\Install{(descendants whose (name of it contains “SEP11”) of folder “C:\Install”)}”

ENDIF

Results:

// Deletes Old SEP Installation folder(s) if exists

Failed if {(exists (descendants whose (name of it contains “SEP11”) of folder “C:\Install”))

delete “C:\Install{(descendants whose (name of it contains “SEP11”) of folder “C:\Install”)}”

endif

(imported comment written by NoahSalzman)

You are missing a closing } in your first line.

IF {(exists (descendants whose (name of it contains “SEP11”) of folder “C:\Install”))

}

delete “C:\Install{(descendants whose (name of it contains “SEP11”) of folder “C:\Install”)}”

ENDIF

(imported comment written by RHSteeleOH91)

tyvm Noah!