We help IT Professionals succeed at work.

Apple Script Rookie: Script to Copy folder from server to MAC

629 Views
Last Modified: 2013-11-17
I have a folder called "cs2Install" that I need to have copied locally to a MAC client.  The folder is on a MAC acting as the server (let's say the IP is 10.1.2.3), I need a script that will display a message telling the user that the folder is being copied to their hard drive and then (of course) copies the folder to there hard drive.  The script will be housed on the server and user's will access it through a web browser.  

Thanks.
Comment
Watch Question

Do have to copy/install this to several MAC's or only one?

Author

Commented:
Only one.  It will be on the server and user's will, one at a time, copy/install it.

Author

Commented:
This may be easier and would also resolve my problem:

I have four .dmg images for the installation of Adobe CS2.  Is there a way to convert these four .dmg images into one and have the user run just the one .dmg image?
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
It'll be one Mac at a time (ultimately many workstation installations)

Author

Commented:
This works when I run it:

set cs2install to "Adobe Creative Suite Premium 2.0"

set myPath to (choose folder with prompt "Where do you want the folder copied to?") as text
tell application "Finder"
      make new folder at folder myPath with properties {name:cs2install}
end tell
set installFolder to myPath & cs2install
tell application "Finder"
      duplicate "Hard Drive:cs2install:CD1.dmg" to folder installFolder
      duplicate "Hard Drive:cs2install:CD2.dmg" to folder installFolder
      duplicate "Hard Drive:cs2install:CD3.dmg" to folder installFolder
      duplicate "Hard Drive:cs2install:CD4.dmg" to folder installFolder
end tell

I get an error saying "Finder got an error: Can't set folder "Hard Drive:Users:standard:Desktop:Adobe Creative Suite Premium 2.0" to "http://1.1.1.1/software/adobecreativesuitepre/CD1.dmg".

set cs2install to "Adobe Creative Suite Premium 2.0"

set myPath to (choose folder with prompt "Where do you want the folder copied to?") as text
tell application "Finder"
      make new folder at folder myPath with properties {name:cs2install}
end tell
set installFolder to myPath & cs2install
tell application "Finder"
      duplicate "http://1.1.1.1/software/adobecreativesuite2pre/CD1.dmg" to folder installFolder
      duplicate "http://1.1.1.1/software/adobecreativesuite2pre/CD2.dmg" to folder installFolder
      duplicate "http://1.1.1.1/software/adobecreativesuite2pre/CD3.dmg" to folder installFolder
      duplicate "http://1.1.1.1/software/adobecreativesuite2pre/CD4.dmg" to folder installFolder
end tell

I've changed the IP address in this post, but I have a vaild one and it gets the error.  Is there something I need to change in the syntax when I copy it from the server?

Author

Commented:
Ok, I've done a lot of research on this and for some reason can't find any resources on copying files from a server.  I think I have the syntax right, I just don't have the name of the server.  I'll keep looking, but any help would be greatly appreciated.  I didn't think this would be too difficult a question.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.