• 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: finder - how do I rename/move this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finder - how do I rename/move this?


  • Subject: Re: finder - how do I rename/move this?
  • From: Christopher Stone <email@hidden>
  • Date: Sat, 24 Dec 2011 02:04:50 -0600

Hey Dave,

On Dec 23, 2011, at 11:50, Dave wrote:
filemaker server daily creates a backup with a time date stamp like: THIS-FOLDER_2011-12-22_2245
now I need to move it's contents elsewhere
since it is always different name ever day - I can't get to it with simple scripting

Au contraire mon ami; it is very simple scripting.

here is the path...

maindrive/bu1/bu1a/THIS-FOLDER_2011-12-22_2245/main-here

This is quite basic, but it should be close to what you're asking for:

try


set moveDestination to alias "Thor:Users:chris:Move_Destination:"
set fileMakerBackupLocation to alias "Thor:bu1:bu1a:"


tell application "Finder"


set newFileMakerBackup to folders of fileMakerBackupLocation as alias list


if length of newFileMakerBackup = 1 then


set newFileMakerBackup to item 1 of newFileMakerBackup
set name of newFileMakerBackup to "Some_Goofy_Name"
move newFileMakerBackup to moveDestination


else


error "newFileMakerBackup has incorrect length!"


end if


end tell


on error errMsg number errNum
set {cr, sep} to {return, "------------------------------------------"}
set e to sep & cr & "Error: " & errMsg & cr & sep & cr & "Error Number: " & errNum & cr & sep
beep
display dialog e
end try

--
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: 
 >finder - how do I rename/move this? (From: Dave <email@hidden>)

  • Prev by Date: Re: finder - how do I rename/move this?
  • Next by Date: Still think it's a BUG in Smile 3.6.0 (668)
  • Previous by thread: Re: finder - how do I rename/move this?
  • Next by thread: Re: Folder Actions Scripts
  • Index(es):
    • Date
    • Thread