• 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: Disk drive exerciser?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disk drive exerciser?


  • Subject: Re: Disk drive exerciser?
  • From: "Manoah F. Adams" <email@hidden>
  • Date: Sat, 10 Aug 2013 02:32:38 -0700

Hi,

A couple suggestions . . . [see quoted text] ...


On Aug 9, 2013, at 23:26 , Dave C wrote:

OK, first attempt. I'm getting "Syntax Error: Can't set thatdisk with replacing to myfile Access not allowed."

Thanks,
Dave

- - -

- Why the mount operations?   Rarely does the system skip mounting a volume.
    .... If you know the volume name ahead of time (as you seem to do) can't you just use it without the mount/grep stuff?
    .... Alternatively, if the names are different each time, try a choose folder operation for the user to pick a drive.
set mydisk to (do shell script "diskutil list | grep 'ReallyTiny'")
do shell script "diskutil mount " & (last word of mydisk)

set thatdisk to (do shell script "diskutil list | grep 'Tiny650'")
do shell script "diskutil mount " & (last word of mydisk)

- A "delay 5" or similar interval might be good here as shell might return before the volume is really mounted and ready.

- for a task like this it may be better to use the shell rather than the Finder
    e.g.: do shell script "cp '" & sourceFilePath & "' '" & targetDirPath & "';"
tell application "Finder"
set myfile to alias "/Volumes/ReallyTiny/Down The Rabbit Hole.mp4"
* make your target path a directory rather than the file name at the target path.
e.g.: /Volumes/ReallyTiny/
set thatfile to file "/Volumes/ReallyTiny/Down The Rabbit Hole.mp4"
copy myfile to thatdisk with replacing
* Use the "duplicate" command, as "copy" is a language keyword.
-- duplicate myfile to thatdisk with replacing
end tell

-=-=-=-


 _______________________________________________
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: 
 >Disk drive exerciser? (From: Dave C <email@hidden>)
 >Re: Disk drive exerciser? (From: Dave C <email@hidden>)

  • Prev by Date: Re: Disk drive exerciser?
  • Next by Date: Re: Folder Action for Applications
  • Previous by thread: Re: Disk drive exerciser?
  • Next by thread: GraphicConverter 'open file'
  • Index(es):
    • Date
    • Thread