• 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
Renaming files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Renaming files


  • Subject: Renaming files
  • From: Carl Earl <email@hidden>
  • Date: Tue, 17 Feb 2009 08:48:32 -0800

I have a script that was working in OS 9. It reads a file name, creates a folder, renames the file and moves it to the folder. It is used to sort files into categories. 
It does not run in OS X. I have it working reading the files creating the folders and moving the files but my renaming code will not work. I get an error "Finder got an error: Can’t set name of selection to "SGMach1.pdf"." Does anyone have an idea? I have searched the archives and can't fine this error.
Here is the code.

make new folder at folder outFold with properties {name:classnam}
select item i of pdffiles
ignoring case
if ext is "pdf" then
set name of selection to advname & i & "." & ext
move selection to folder classnam of folder outFold
else
delete selection
end if

Thanks
Carl
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Renaming files
      • From: Carl Earl <email@hidden>
  • Prev by Date: Re: Cleaning up after a script
  • Next by Date: Re: Cleaning up after a script
  • Previous by thread: Re: Cleaning up after a script
  • Next by thread: Re: Renaming files
  • Index(es):
    • Date
    • Thread