hypertron
Registered
alright, i was using applescript and i wanted to make a script to delete a file in the applications folder. I soon found out it didn't work the same way as terminal (specifying directories just by typing the user's directory, then a backslash, and then continuing until you got to the file), you instead had to specify the directory by using the "set directory to" command. So my first line of code looked like this .
It didn't give me any error when i tested it, but when i tried to tell finder to move a certain file to the trash, it gave me an error telling it couldn't fine the file. Here is that code
Then I had Finder empty the trash, which i had already tested and worked.
So all the code together was
So if any one can help that would be great. Also -I know this is the most retarded question ever, but- can someone tell what terminal puts in place of spaces in file names.
Thanks in advance
-Hypertron
Code:
set directory to "Applications"
Code:
tell application "Finder"
move "TuxRacer" to trash
end tell
Then I had Finder empty the trash, which i had already tested and worked.
Code:
tell application "Finder"
empty trash
end tell
Code:
set directory to "Applications"
tell application "Finder"
move "TuxRacer" to trash
end tell
tell application "Finder"
empty trash
end tell
So if any one can help that would be great. Also -I know this is the most retarded question ever, but- can someone tell what terminal puts in place of spaces in file names.
Thanks in advance
-Hypertron