• 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: Obtaining the name of a "dropped" folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining the name of a "dropped" folder


  • Subject: Re: Obtaining the name of a "dropped" folder
  • From: Michael Turner <email@hidden>
  • Date: Thu, 11 Apr 2002 10:32:44 -0400

Chad,

I recently wrote a similar handler, using AS's Text item delimiters to break out the files from the folders. Unfortunately, that file is at home, and Im at work, or I would just send it. Shall I send that tonight?

Seems like if you set TIDs to ":" and then test for the last tid in a string, folders are null, if I recall correctly.

Warning: I would not presume any order in a list of files dropped. Folder name may not come first, or may not come first next version of the OS, whatever.

/Michael
home email: email@hidden

On Thursday, April 11, 2002, at 07:05 AM, Chad Chelius wrote:

I am trying to write a script that will "capture" the name of a folder
dropped onto the icon, then change the name of the folder that was dropped
and then change the names of items within the folder based on the old folder
name. Are we confused yet? For example, if I drop a folder onto my droplet
called Test, the script will remember the name test, then change the name of
that folder to whatever, Job1 for instance and then I want to change the
names of elements within that folder based on the original folder name.
Maybe change an eps file within that folder from test.eps to job1.eps. Any
help would be greatly appreciated. Below is the script that I have written
so far but the set OldFilename line doesn't work.


on open (ThisFolder)

Note: returns a list. IE: {folder/folder/folder/file, folder/folder/folder}

display dialog "Please enter a new name for your page" default answer ""
set NewName to text returned of the result
set OldFilename to name of ThisFolder
set ThisFolder to ThisFolder as alias
try
tell application "Finder"
set the name of rampagefolder to NewName
end tell
on error ConvertERR
display dialog ConvertERR
end try
end open
--
Chad Chelius
_______________________________________________
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.

  • Follow-Ups:
    • Re: Obtaining the name of a "dropped" folder
      • From: Michael Turner <email@hidden>
References: 
 >Obtaining the name of a "dropped" folder (From: Chad Chelius <email@hidden>)

  • Prev by Date: Re: InDesign Scripting (David Lloyd)
  • Next by Date: ACGI & OSX - pages greater then 32k???
  • Previous by thread: Obtaining the name of a "dropped" folder
  • Next by thread: Re: Obtaining the name of a "dropped" folder
  • Index(es):
    • Date
    • Thread