Trying to set up a Self Service policy to delete a folder (with additional folders and files in it), located in the user's home folder. Current script I'm using is below:
!/bin/bash
loggedInUser=$(ls -l /dev/console | awk '{ print $3 }')
"rm -rf ~/Documents/folder/folder/folder/"
I've tried different variations (rmdir, rm -r, without " marks, leaving off the final /), but no luck. Works fine on deleting a file though and running the rm -rf command via ARD as the current user also works. All things being equal, I'd really like to just move the directory to the user's trash, but again the script works fine with a file, but not a folder.
Any help or suggestions would be appreciated, thanks!
