• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mounting a laptop volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mounting a laptop volume


  • Subject: Re: Mounting a laptop volume
  • From: Alex Zavatone <email@hidden>
  • Date: Fri, 13 May 2011 01:36:34 -0500

Please feel free to clean up.

on CopyAssetsToServer()
-- with timeout of 1 second
-- mount volume "<protocol>://<user>:<pass>@<ip>/<share>"
-- end timeout


-- mount server
set myServer to "afp://graphics:email@hidden/Assets"


set mySourceFolder to pOptimizedPNGPath & ":" & pDocumentName
-- set myTargetFolder to (the quoted form of POSIX path of "Volumes:Assets:") -- pDocumentName


tell application "Finder"
set myTargetFolder to (the quoted form of POSIX path of "Volumes:Assets:") -- pDocumentName
-- set myTargetFolder to path to "Volumes:Assets:"
try
set myTargetFolder to disk "assets"
on error myError number myMessage
log myError & " " & number & " " & myMessage
end try
end tell


-- set myTargetFolder to Volume "Assets"


try
with timeout of 2 seconds
tell application "Finder"
mount volume myServer -- with username "graphics" with password ""
-- mount volume "Assets" on server "afp://mercury-server.ebiz.verizon.com/" as user name "graphics" with password ""
-- mount volume "Assets" on server "afp://mercury-server.ebiz.verizon.com/" as user name "graphics" with password "graphics"
end tell
end timeout
on error
log "mount error"
end try


say "Copying files to staging server." using "Alex"
set myMessage to "Copy complete."
-- copy files
tell application "Finder"
try
duplicate mySourceFolder to myTargetFolder with replacing
on error
set myMessage to "Copy failed.  Please copy the folder to the assets volume manually."
end try
end tell

say myMessage using "Alex"
end CopyAssetsToServer
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Mounting a laptop volume (From: Jim Brandt <email@hidden>)
 >Re: Mounting a laptop volume (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Sending AppleScript objects from one app to another
  • Next by Date: Re: Mounting a laptop volume
  • Previous by thread: Re: Mounting a laptop volume
  • Next by thread: Re: Mounting a laptop volume
  • Index(es):
    • Date
    • Thread