• 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: file sorting via applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file sorting via applescript?


  • Subject: Re: file sorting via applescript?
  • From: KOENIG Yvan <email@hidden>
  • Date: Tue, 8 Jan 2008 21:33:26 +0100

Le 8 janv. 2008 à 19:12, Patrik B. a écrit :

Hi,
I have bunch of folders that contain images for each language sorted by type
of item:
I.e.


Folder 1 "Book One"
-------------------
JAP-Book One.psd  -- files in the folder
DAN-Book One.psd
HEB-Book One.psd
GER-Book One.psd
etc.

Now I want to make copy (not move) these but have them all sorted by language
(3 letter prefix followed by a hyphen.)


So that I then have a folder structure like this

JAP -- folder
-------------
JAP-Book.psd
JAP-Binder.psd
JAP-Binder 2.psd
JAP-Box.psd

DAN -- folder
-------------
DAN-Book.psd
etc.

I started writing a finder script but was wondering if there is already a
simple sort/duplicate library or even shell script that I could use.


Per what I understand I will have to have 2 lists and sort them toghether
(Files, Filenames) - how do I do this part?


Then based on my sorting of the filenames I need to copy the respective files
to the new folder via finder - that seems rather easy.


Best,Patrik

No need to sort them

Scan the original folders
if not exists a destination folder corresponding to the file, create it
   copy the file to its corresponding folder.
Do that for every file.

When finished,
all JAP-xxx files would be in the JAP - folder
all DAN-xxx files would be in the DAN - folder
…

Yvan KOENIG _______________________________________________
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: file sorting via applescript?
      • From: "Mark J. Reed" <email@hidden>
References: 
 >file sorting via applescript? (From: "Patrik B." <email@hidden>)

  • Prev by Date: Re: Script doesn't work in Leopard anymore...
  • Next by Date: Re: How do you add a track not currently in iTunes to iTunes playlist using applescript
  • Previous by thread: file sorting via applescript?
  • Next by thread: Re: file sorting via applescript?
  • Index(es):
    • Date
    • Thread