I have a script written for personal usage that will duplicate the my home folder to a shared server at work. But I want to make this more portable so that I can share it with co-workers who can run it without having to touch much code.
There is also the issue it not running more than once because there is already a previous file from running the script once. I get the error saying that "An item with the same name already exists in this location.
How can I achieve this? Here is the code I currently have:
There is also the issue it not running more than once because there is already a previous file from running the script once. I get the error saying that "An item with the same name already exists in this location.
How can I achieve this? Here is the code I currently have:
Code:
set vserver to POSIX file "/Volumes/(user)"
set source to POSIX file "/Users/(homefoldername)
tell application "Finder"
duplicate source to vserver
end tell