Obtaining the name of a "dropped" folder
Obtaining the name of a "dropped" folder
- Subject: Obtaining the name of a "dropped" folder
- From: Chad Chelius <email@hidden>
- Date: Thu, 11 Apr 2002 07:05:19 -0400
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)
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
Systems Administrator
Offset Impressions, Inc.
email@hidden
610-236-4722
_______________________________________________
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.