• 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: Count and rename files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Count and rename files


  • Subject: Re: Count and rename files
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 24 Sep 2003 07:59:03 -0700

It's a bit hard to help without knowing what the error is, and on which line you get the error message. If script does not throw an error, but simply does not work, then the log would be most helpful.

On Wednesday, September 24, 2003, at 01:48 AM, Peter Mathiessen wrote:

copy "Macintosh HD:Script_folder:Count_rename_files:" as text to the_vol

Minor point: "as text" is not necessary; it is already text.

set searchFolder to alias (the_vol & "Folder_in")
set destinationfolder to alias (the_vol & "temp")
set rename_file to alias (the_vol & "rename")
set destination_file_folder to alias (the_vol & "filer_ut")

set myList to list folder destinationfolder without invisibles

Major point: destinationfolder is already an alias; don't prepend "folder" to it.

repeat with myFilename in every item of myList
set movefile to alias (the_vol & "temp:" & myFilename)

Potential major point: There is no file there, unless you have duplicate files in temp and destinationfolder

tell application "Finder"
set name of file movefile to characters -1 thru -4 of (myFilename) as string

Minor point: It would be better to use "text -1 through -4 of myFilename"

end tell
end repeat

--Michelle

--
Failure is not an option. It comes bundled with the software.
_______________________________________________
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: Count and rename files
      • From: Emmanuel <email@hidden>
References: 
 >Count and rename files (From: Peter Mathiessen <email@hidden>)

  • Prev by Date: Re: Image thumbnails question
  • Next by Date: Re: When = == ≠
  • Previous by thread: Re: Count and rename files
  • Next by thread: Re: Count and rename files
  • Index(es):
    • Date
    • Thread