/build/static/layout/Breadcrumb_cap_w.png

Is there a way to delete a directory on a Mac using a script?

I often see ways of doing this on the windows side, but I'd like to be able to remove a folder on a students MAC OS X machine (specifically a Java folder) that is causing issues and the fix is to remove it, but touching just about 500 computers is painful. The folder location would be the same on each computer.

Thanks!,

Jesse

1 Comment   [ + ] Show comment
  • You can write a bash script that would remove the folder. - apptopack 8 years ago

Answers (1)

Posted by: jknox 8 years ago
Red Belt
0
Edit:  I completely missed the fact that you were asking about a Mac.

The easiest way to do this would probably be by using an online shell script that runs something like:

rm -r /your/file/location

Windows:

You could use the "Launch a Program" task to call something like: rd /S c:\your\file\location

Alternatively, you could upload a batch file that deletes the directory as a dependency and call that.

The one caveat to this would be to see if LocalSystem has rights to delete the location.  If not, you would need to specify a user that does under the Run As section of the kscript.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ