I have a property which has an array of files names. Some are system level and some are home level, which mean its under the library folder of my personal directory. The system files delete successfully, however, the home level files do not. I usually access them like this: ~/Library/Application Support/Software
And then I have a loop which picks each file and deletes it with an rm -R shell script command with administrator privileges.
Am I accessing the home directory the wrong way? Should I use the “~” key?
do shell script "rm -rf ~/Library/Application\\ Support/A\\ FOLDER/" with administrator privileges
do shell script "rm -rf ~/Library/Application\\ Support/A\\ TEST\\ FOLDER/" with administrator privileges and password
do shell script "rm -rf ~/Library/Application\\ Support/Test\\ File.txt" with administrator privileges and password
do shell script "rm -rf ~/Library/Application\\ Support/Test\\ File\\ 2.txt" with administrator privileges and password
Browser: Safari 525.18
Operating System: Mac OS X (10.4)
“any file or folder” means, you have always 4 existing files and folders.
create the same 4 files and folders again, then rename in your script ~/Library/Application\ Support/A\ FOLDER/
with ~/Library/Application\ Support/A\ FOLDER_ONE/