Hello,
I’m totally new to Applescript, and I’m trying to make some proof-of-concept scripts. Right now I’m renaming a file. Doing it on the desktop is easy,
tell application "Finder"
set the name of file "test.txt" to "test2.txt"
end tell
I run into trouble when trying to do it for another folder, though. I want the file test.txt stored in Documents/Test, and I’m guessing I can do this with
(path to documents folder)
(and maybe POSIX?), but I tend to get error-messages whatever I try. Anyone who can help me on this? I don’t want the username to be hard-coded into the script, as it wouldn’t run on other users. That’s why I’m guessing “path to documents folder” is a good start.
Thanks