• 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: move a file to an external drive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move a file to an external drive


  • Subject: Re: move a file to an external drive
  • From: Christopher Stone <email@hidden>
  • Date: Thu, 14 Jul 2011 14:54:32 -0500

On Jul 14, 2011, at 13:28, Jack Schwart wrote:
I've been doing is downloading both the jpegs and the raws files to the external drive, and then just importing the jpegs into iPhoto to save hard drive space.
______________________________________________________________________

Hey Jack,

It seems to me you're going about this the hard way.

Since I don't regularly do this sort of operation I might be missing something but, if you do a direct import to iPhoto and then drop both the jpg and raw files into a dated archive folder things might work more to your liking.

property externalDrive : alias "Photos:"
property externalDriveImportFolder : alias "Photos:Photo Import:"

try
tell application "Finder"
set jpgFileList to (files of externalDriveImportFolder whose name extension is "jpg") as alias list
end tell


tell application "iPhoto"
import from jpgFileList to first album whose name is "Photos"
end tell


on error errMsg number errNum
set sep to "=============================="
set e to sep & return & "Error: " & errMsg & return & sep & return ¬
& "Error Number: " & errNum & return & sep
beep
display dialog e
end try

Here's code I use to enclose the Finder selection in a dated folder:

tell application "Finder"
try
set sel to selection as alias list
if sel ≠ {} then
set theTargetFolder to container of (item 1 of sel) as alias
set dateTimeString to do shell script "date \"+%Y-%m-%d-%H%M%S\""
set newFolderName to dateTimeString & " (Gathered)"
set newFolder to make new folder at theTargetFolder with properties {name:newFolderName}
set label index of newFolder to 2
move sel to newFolder
select newFolder
end if
on error errMsg number errNum
beep
display dialog "Error: " & errMsg & return & "Error Number: " & errNum
end try
end tell

It would be easy to adapt this to move to an archive folder instead.

--
Best Regards,
Chris

 _______________________________________________
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: 
 >move a file to an external drive (From: Jack Schwart <email@hidden>)

  • Prev by Date: Indesign data merge
  • Next by Date: Re: Google Chrome: Set variable to result of JavaScript
  • Previous by thread: Re: move a file to an external drive
  • Next by thread: Indesign data merge
  • Index(es):
    • Date
    • Thread