2 Replies - 879 Views - Last Post: 07 July 2012 - 07:19 AM Rate Topic: -----

#1 Slylingual  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-February 12

AppleScript Assistance

Posted 14 June 2012 - 12:14 AM

Hello everyone,

First off I don't know if this belongs here, so I apologize in advance.

I'm trying to create an AppleScript where I copy a folder in /Library/Logs/ over to /Desktop/Logs/ ... Like so:


tell application "Finder"
	make new folder at alias "Mac:Users:user:Desktop:" with properties {name:"Test"}
	copy folder "Mac:Library:Logs:com.test.testlog:" to folder "Mac:Users:user:Desktop:Test"
end tell

However, I want to make this work on other Macintosh's as well, and other Mac's rename their HD. I basically just want to know how to write this to make it look for / and not the HD name and also the user folder (since it'll be different user folder names)

I've tried ~/Library/ basically adding the tilda, but that didn't work.

Any help is appreciated, thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: AppleScript Assistance

#2 denting5  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 84
  • Joined: 03-June 12

Re: AppleScript Assistance

Posted 25 June 2012 - 09:35 AM

This should be working on all Macs already, unless the users have been playing with the directory.
Was This Post Helpful? 0
  • +
  • -

#3 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 3459
  • View blog
  • Posts: 12,303
  • Joined: 08-August 08

Re: AppleScript Assistance

Posted 07 July 2012 - 07:19 AM

You want "path to home folder"

Here's a good site for Applescript help.

You might also consider using a shell script. That's where the tilda would be useful.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1