Re: Getting the Folder name when using drag-&-drop Scripts
Re: Getting the Folder name when using drag-&-drop Scripts
- Subject: Re: Getting the Folder name when using drag-&-drop Scripts
- From: "Easthope, John R" <email@hidden>
- Date: Wed, 10 Mar 2004 15:53:01 -0700
- Thread-topic: Re: Getting the Folder name when using drag-&-drop Scripts
Does anyone know the language to capture the name of a folder dropped onto an Applescript so that it can be assigned to a variable?
These two examples do not catch the actual Folder dropped but rather a file or the container of a file.
* File
copy (choose file) as string to thePath
copy text (((length of thePath) + 2) - ((offset of ":" in (reverse of characters of thePath) as string))) thru (length of thePath) of thePath to filename
*File Container
copy (choose file) as string to thePath
copy text 1 thru ((length of thePath) - ((offset of ":" in (reverse of characters of thePath) as string)) + 1) of thePath to filePath
(The second "copy" command of these examples should be entered as one line.)
I am sure the solution is a variation of one of these.
Thanks
John
_________________________________________
John Easthope
School Technology Support Analyst
Calgary Board of Education
Help Desk: 294-8111 Fax: 294-8689
Email: email@hidden
_________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.