Go Back   The macosxhints Forums > OS X Help Requests > AppleScript



Reply
 
Thread Tools Rate Thread Display Modes
Old 06-22-2012, 11:05 AM   #1
soccer16x
Prospect
 
Join Date: Jun 2012
Posts: 1
Question How to move files without having the user in the path

So basically I'm new to applescript and i need to move/copy files from the path /Users/<user>/Library/Application Support to the desktop. And the reason is that i'm going to be giving this to other people and if i have a specified user it will not work, Also it doesnt matter to me if it is some sophisticated fast script i just need it to work and i need it soon. After looking hours on google only finding ways to specify the user i just need help.

My os x version by the way is 10.6.8
soccer16x is offline   Reply With Quote
Old 06-23-2012, 04:21 PM   #2
regulus6633
Major Leaguer
 
Join Date: Apr 2005
Posts: 477
Applescript has tools for this. First you have some learning to do about paths in applescript. To start, in applescript paths are colon ":" delimited and start with the name of the hard drive (not slash "/" delimited as you are showing). So I suggest you do a little learning first.

But to solve your immediate problem... applescript has shortcuts for well defined folders. For the 2 folders you mention...
Code:
set desktopFolder to path to desktop as text
Code:
set appSupportFolder to path to application support folder from user domain as text
Take a look at the results after running either of those commands to see what an applescript path looks like!
__________________
Hank
http://www.hamsoftengineering.com
regulus6633 is offline   Reply With Quote
Reply

Tags
applescript, os x 10.6.8

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 03:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.