Need some help with an applescript copying files from the desktop of my computer to the Synology NAS. I am really stuck.
The following would work for copying files from one folder to another folder on the desktop. Now I want to copy the files from the desktop to my NAS.
Is there someone who could please help me getting the files copied to my NAS instead of another folder on my desktop?
What I have so far:
Obviously the above script works for copying files from folder A to folder B on the same HD. Now I want it to copy to my NAS, but need some help from somebody on how I do this.
Your help will be greatly appreciated!
The following would work for copying files from one folder to another folder on the desktop. Now I want to copy the files from the desktop to my NAS.
Is there someone who could please help me getting the files copied to my NAS instead of another folder on my desktop?
What I have so far:
Code:
property HDname : {"Mac OS X"} -- Name of my internal HD
property User : {"Username"} -- The username I use on my Mac
property SourceHD : {"Mac OS X"} -- Name of my internal HD
property SourceFolder : {"Desktop", "test 1"} -- Sourcefolder
property TargetHD : {"Mac OS X"}
property DropFolder : {"Desktop", "test 2"}
property TargetVolume : {"NASname"}
property NASusername : {"NASusername"}
property NASpassword : {"Naspassword"}
property TargetVolumeFolder : {"Photography", "Photostream"}
Code:
-- Actual Script --
tell application "Finder"
set sourcefiles to item 1 of SourceHD & ":Users:" & item 1 of User & ":" & item 1 of SourceFolder & ":" & item 2 of SourceFolder as alias
set target_folder to item 1 of TargetHD & ":Users:" & item 1 of User & ":" & item 1 of DropFolder & ":" & item 2 of DropFolder as alias
try
duplicate (every file of the entire contents of sourcefiles whose name extension is in {"JPG", "NEF", "RAW", "RAW2"}) to the target_folder with replacing
end try
end tell
-- END Script --
Obviously the above script works for copying files from folder A to folder B on the same HD. Now I want it to copy to my NAS, but need some help from somebody on how I do this.
Your help will be greatly appreciated!
Last edited by a moderator: