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 9 years ago
Answers (1)
Please log in to answer
Posted by:
jknox
9 years ago
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:
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.