Sorting files in folders from the parts of a file name

Hello

I have a library of images that I need to build to work. The images have been recorded as this for example

Dolce & Gabbana - the One_EDT_50ml.jpg

There are 1000's of brands, so I need a script that looks for the part of the file name before the hyphen. and create a folder based on all the images that fall under this brand.

If anyone can help?

I've never used script before, but any solution I can work with that will work for me.

Thank you

Use the following syntax:

Tell application "Finder".

Repeat until (files window count 1) is 0

the value the_offset to compensate for the "-" (get the window 1 1 file name)

the value the_name items 1 thru (the_offset - 1) (get the filename window 1 1) as string

move (all files 1 window whose name begins with the_name) (making the new file to the window 1 with properties {name: the_name})

end repeat

tell the end

(143816)

Tags: Mac OS & System Software

Similar Questions

  • Manually remove files and folders from the registry and everywhere else Windows 7 Ultimate command center. Area 51 ALX.

    Hello, the application on my computer command center became corrupted several times in the past. Tried several times to reinstall from the site Web of Dell but as usual, in just a few days becomes a ball dead dysfunctional and even conflicts with other applications and makes my computer run slowly. Having had enough. I decide to uninstall it and then reinstall it if I can get it to work just long enough for the lighting and the case vents program I like exploitation, programming for always the firmware on the map of IO control. and then uninstall the application. never to give him another chance. Now that most of it has gone through adding and removing programs, he left behind him i ' ts corrupted of unnecessary files in other areas, continues to wreak havoc on my computer. Please give me a list of instructions telling me where to go to find these folders, files and delete them. Thank you very much!

    Hello

    Follow the steps in the article below:

    SLN303405 - how to remove and reinstall the Alienware command center

    Let me know if you need anything else!

  • Can't remove empty folders from the folder of files HTML (topics) in the project tab

    Hello

    I imported another RH6 project HTML files. Now I have some empty folders in the folder of files HTML (headings) on the project tab. I want to delete them, but the option remove has been grayed out. Any suggestions?

    Thank you
    FMnRH

    Before you delete anything, I would say that you check that the desired folder badly in the other Pseudo-dossiers your HR project are empty. This ususally happens when the items imported using the resources of another folder (usually images but can also be a style sheet). If you delete the files in the Explorer you might end with the missing images. Move the images of HR in the folder desired and then you should see the Remove option is active again from the HTML HR folder.

  • To access the files and folders from the hard drive Windows 7 on Windows XP, access denied error message.

    Original title: portable destroyed - need for car access

    I don't know if this is the right forum - please advice if it is not.

    My friend's laptop computer was destroyed in a car accident. I pulled the drive and placed it in my desktop XP system and the drive appear in good health. However, I received permission issues trying to access records on the disk and thought that it was because of me using Win XP and the laptop was Win7x64. My questions below are based on the assumption that I'm not able to access these files on my Win XP system. If this assumption is incorrect, so please let me know.

    I have a laptop that I don't use and put the disk in it. I was hoping it would be plug and play all the new material, but after reading a little online, I know that this is not the best thing to do and will probably not work as did the earlier versions of Windows.

    In the end, I care retrieves the contents of the disc, although it would be great if I could lend my laptop for a few weeks with "its files" until it sorts how to replace the laptop.

    Can I get the player Win7x64 working on the laptop computer of replacement by reinstalling Win7x64 on this laptop? I'm not "means a clean install/reformat, but have rather the Setup program detects an existing installation, and do its magic to get the operating system runs on new hardware?"

    I know that this raises questions of MS licenses. If the installation process could get his old system running on the laptop replacement, if I have a small window of time completely to access his files before being forced to re-register the OS? I'm hoping so.

    I'm looking for only a short-term solution - I do not recommend that he hopes that drive long term because the laptop got quite truncated of the accident, and once he gets a new laptop it will have everything he needs on this subject (OS, licenses, etc.). If I have a small window of time where I can simply copy their important files, or to lend him my laptop with its player and him can bring to its domestic network and the print out of all the things that are important, that it's going to be all together to move them to a new laptop when it is available.

    Thank you

    Hello

    You experience this problem because of the permissions applied to these s folder.  To resolve this problem, you will need to take ownership of these files and folders.

    Method 1: You can follow the steps mentioned in the link below to take possession of the records

    Troubleshoot "access denied" when opening files or folders

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-access-denied-when-opening-files-or-folders

    (Article above applies to Windows Vista, not valid for Windows XP)

    Also check out the article below

    How to capture a file or a folder in Windows XP
    http://support.Microsoft.com/kb/308421

    Method 2:  You can try a custom installation (not a format\clean facility).

    See the link below for custom installation
    using the install option custom without formatting the hard drive

    Note: In custom installation only data would be transferred in Windows. Drivers, applications and the old folder will need to be reinstalled.

  • How to exclude certain folders from the result of the query

    I'm writing a query to exclude some records from a query. Normally, of course, I do it with a NOT IN or use SUBTRACT. However, I can not do with these records because it is not working properly. There is a table called SHRTRCE that contains fields for PIDM, SUBJ, COURSE and TITLE, coded as follows:
    create table SHRTRCE
    (
    PIDM     NUMBER     NOT NULL
    SUBJ     VARCHAR2(10)
    COURSE     VARCHAR2(6)
    TITLE     VARCHAR2(30)
    )
    /
    INSERT INTO SHRTRCE
    (PIDM,SUBJ,COURSE,TITLE)
    VALUES
    (12345,MATH,1X0501,COLLEGE ALGEBRA)
    /
    INSERT INTO SHRTRCE
    (PIDM,SUBJ,COURSE,TITLE)
    VALUES
    (12345,ENG,2X1001,COMPOSITION II)
    /
    INSERT INTO SHRTRCE
    (PIDM,SUBJ,COURSE,TITLE)
    VALUES
    (12345,PSYC,1X0101,GENERAL PSYCH)
    /
    INSERT INTO SHRTRCE
    (PIDM,SUBJ,COURSE,TITLE)
    VALUES
    (23456,ENG,1X1001,COMPOSITION I)
    /
    INSERT INTO SHRTRCE
    (PIDM,SUBJ,COURSE,TITLE)
    VALUES
    (23456,PHY,1X3201,NON-LAB PHYSICS)
    /
    INSERT INTO SHRTRCE
    (PIDM,SUBJ,COURSE,TITLE)
    VALUES
    (34567,MATH,1X0501,COLLEGE ALGEBRA)
    /
    INSERT INTO SHRTRCE
    (PIDM,SUBJ,COURSE,TITLE)
    VALUES
    (34567,MATH,2X2010,CALCULUS I)
    /
    I want to do is pull ONLY the records for these PIDMS where there is no class with the OBJECT of MATHEMATICS. So, in this case, I want only the values for PIDM 23456. If I use NOT IN, I always get PIDMs in my list where the person did one or more courses of MATHEMATICS; only, it excludes courses, which are MATHEMATICAL, but leaves others. If I use a SUBTRACTION, producing the same results. I don't know how to proceed at this point. I'm going to cut him, but thought I'd post something because I know it is probably something easy enough, I'm simply not anywhere in my books.

    Thank you very much
    Michelle Craig
    Data Coordinator
    Kent State University

    Published by: BluShadow on January 10, 2012 14:23
    fixed {noformat}
    {noformat} tags.  the word "code" must be lower case in both tags                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Do not know what is the problem with NOT IN for you, seems ok to me...

    select *
    from shrtrce
    where pidm not in (select pidm from shrtrce where subj = 'MATH')
    
  • How to search the folder hierarchy by the parties of a folder name. Is there a library similar to library bookmark folder to facilitate the Organization of record?

    How can I search by folder for the email account names and names of folder of bookmarks by keywords or parts of the name of the folder? Is there a way to enter and to associate keywords to send/benchmark folder names?

    We put all our transactions in messaging and bookmarks in a reversed under the account name and appropriate ISP user tree structure, but often end up with double taxonomic entries under multiple ISP accounts such as Roadrunner or Google-mail address for the same Windows user account and the name. Sometimes I create a same folder in both accounts. Be able to search by folder_name in all e-mail accounts in the same Windows user name would be wonderful to correct the bifurcations in taxonomy of folder name.

    What I do not right - please?

    Please - Chris

    I use the add-on for quick folder move - it has a MRU list and a box of text in which you can type a folder name, with an incremental search phase.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/quick-folder-move/?src=API

    You my also find the QuickFolders useful add-on.

    I also wonder if your deposit under the ISP account is the best way to go. I would look of combining messages from accounts under local folders into an independent style of the account.

  • Sort files by date of photos inside

    In the My Pictures folder, I have several files, each representing a different event.  Is it possible to organize these files at the time of the pictures inside?

    So, for example, I have folders called Easter 2012, 2014 Christmas, Halloween 2011.  Normally, the records would be sort alphabetically: Christmas Easter 2012, Halloween 2011, 2014.  I want them to sort chronologically based on pictures in the folder (no matter if the date is in the name of the folder): Easter 2012, 2014 Christmas Halloween 2011.

    Google's Picasa program did what was great (but I can't use for other reasons).  Photo of Microsoft programs have the ability to group by Date taken, but which removes folder groups.  (Group by folder puts the files in alphabetical.)

    Asked the same question and gets no satisfactory answer to this thread: http://answers.microsoft.com/en-us/windows/forum/windows_7-pictures/how-can-i-sort-photo-album-folders-by-the-date/537e0eb9-7c3f-4725-ae3c-ff780b78b058.  (One of the responses refer to the OP to a second thread completely irrelevant, and the other has him manually change each folder name, which is not possible here.)

    So this possible feature in Windows runs download Picasa?  Is it yet another 3rd party program that will do it?

    Thank you!

    Open images folder

    Right click > select sort by Date

    You can open each folder and do the same thing to sort photos by date

    In the Menu folder of photos, select view > sort by

    A menu appears where you can select different options to sort by

  • I am wanting to sort a walk down to the granular level and there are folders with files, etc.. Is there a product on the market that can do this?

    Original title: walk sorting

    I am wanting to sort a walk down to the granular level and there are folders with files, etc.. I am wanting to sort by date created or modified. Is it possible to set the entire disk for all files without having to open each indvidual folder for a list, or is there a product on the market that can do this?

    Sorting all of the drive is not possible. Perhaps, it can be done by another program I'm not aware of.

  • "File > open recent" does not work.    Second problem: impossible to drag individual files or folders, from one place to the other.

    I recently installed Lightroom 6 (stand-alone version).  I have two separate issues: firstly the "file > open recent" does not work.  The cottage my last files but when I click on one of them, nothing happens (don't close the existing catalog, nothing new opens).

    Second problem: I can't drag individual files or folders, from one place to another within the section "Files" from the library.  I did this on a regular basis with older versions of LR so I know how it's done - it does everything just not in this new version.

    Thank you

    Chris

    I think that a Mac person will have to answer your question, I do not use Mac computers.

  • File recovery does not file recovered from the original folder

    I tried two programs of file recovery: Recuva and Pandora Recovery

    Two programs from many files deleted my involuntary removal of the My Documents folder.  However, I expect that the recovered files will be recovered in their original folders that were in My Documents folder deleted.  Instead, the files have been recovered as separate and unrecovered files in their original folders. Is there a recovery program that would recover the files into their original folders that were in the deleted Documents folder?  Otherwise, it seems I have to open about 7000 files and sort them in their folders respective orginal. This seems to be an extremely time consuming and difficult task. Can someone help me? Thank you.  John G.

    I think you'll be lucky to get anything.  Where a file is no not part of the file - it's the metadata stored elsewhere, so it is not possible to recover the files to their previous location.  In the future, it would be much easier to restore files if you have a backup.
     
    Steve
     

    I tried two programs of file recovery: Recuva and Pandora Recovery

    Two programs from many files deleted my involuntary removal of the My Documents folder.  However, I expect that the recovered files will be recovered in their original folders that were in My Documents folder deleted.  Instead, the files have been recovered as separate and unrecovered files in their original folders. Is there a recovery program that would recover the files into their original folders that were in the deleted Documents folder?  Otherwise, it seems I have to open about 7000 files and sort them in their folders respective orginal. This seems to be an extremely time consuming and difficult task. Can someone help me? Thank you.  John G.

  • Update of the absent or invisible e-mails in personal folders from Sierra

    My emails have disappeared from personal folders in Mail since macOS Sierra update from the previous version of El Capitan, indeed personal files themselves seem to be absent or invisible.

    New e-mails that arrived later, for which I put rules in place to move the email to a subfolder in my personal files seem to re-create or reveal part of the hierarchy of folder necessary to reveal or recreate the destination magically subfolder AND reveal not only the new email but also all other emails which were previously contained in this file. However, enamel and her sisters in this subfolder are actually visible once I left and reopened the Mail App.

    Very weird.

    Someone else had a similar problem and / or found a solution?

    Installed Sierra (from Yosemite) Wednesday. First I noticed that my Mail signatures had disappeared. Called Apple's Support, first of all a failure, was transferred to an older person. Repaired permissions, restored from Time Machine - still do not work. Discovered yesterday that some of my mailbox folders were empty, some had old messages, but not recent. A vain another senior tech and reported it to the engineering team.

    I have since discovered that the missing messages are there, but they are invisible in the boxes to the letters. When I do a keyword search, 'invisible' messages are returned in the search results (list as being in their appropriate folder), and I can read the full message of the search window. But if I open the file, it does not show.

    Also, I read in the Inbox of messages disappear after I read the. Demented.

  • I look at the TB dashboard seen comes from open TB. On the left, I see folders. The folder "sent", lets say, is higher than the "Outbox" folder I want to

    I look at the TB dashboard seen comes from open TB. On the left, I see folders. The folder "sent", lets say, is higher than the "Outbox" folder I want to put the "Outbox" folder above the folder "sent". How do I do this ever?

    I know that the addon will allow you to rearrange accounts, so you could put 'Local folders' over another e-mail account.
    It will also allow you to use files within an account.

    So if you have a Pop email account that uses the Global setting of the "Inbox", then it should allow you to move the position of the Outbox within this special account.

    But as the 'Outbox' is a 'Local folder' folder, I'm not sure that you can move it out of "Local folders" and reposition it on another account.

    The method for moving files is done via the menu bar.
    'Tools' > 'manually sort folders ".
    Select the folder and use "move up" or "Down" buttons.
    Then click on the button "refresh folderpane' to see the new sort order.

  • Automator: using a text file to set several items from the finder?

    Hello

    what I would do:

    I have a text file that contains multiple entries for files and folders, each on a separate line. I want to dragndrop this file on an automator action, he should ask me a destination folder and then copy all the files and folders in this folder.

    I have my action, automator, set up like this:

    Elements of the open Finder

    Get the content of the TextEdit Document

    Copy to the Clipboard (I have not found another way to keep my text sort file values and let it not be crushed by the following, but it works)

    Quit the Application (TextEdit)

    Ask the Finder items (this requires a destination folder)

    Set the value of the Variable (Destination)

    Get the contents of the Clipboard

    Copies the items from the Finder (at Destination)

    It all works, but only when there is 1 entry in my text file. As soon as I have 2 lines of text, I get the following error message:

    The action "copy Finder items" has not provided with the required data.

    How can I make this work with multiple entries?

    The problem is that you only pass the only element to the copy action (you have copied text), instead of an element for each line (paragraph) in the text.  The solution is to use the action filter paragraphs to break up along the borders of paragraph text, which will give you a list of items.  In addition, you do not necessarily have to use TextEdit or the Clipboard - If you already have a file somewhere, you can simply use the action to combine text files to read the text.

    With the above modifications, your workflow should look like:

    Ask the Finder items  (ask for a destination folder)

    Set the value of the Variable  (Destination)

    Ask the Finder items  (Download text files) - set the action to ignore the entry

    Combine text files  (read the text files)

    Filter paragraphs  (paragraphs which are not empty return)

    Copy the items to the Finder  (at Destination)

  • Help. Why my computer is "backup", a copy of the photos I'm the downloading from the internet or other folders?

    Whenever I have select multiple photos to download or move somewhere and I get to a number of selected images, Windows, or everything he does makes copies of selected images. It's a stupid program because it does not check to see if a copy had already been made and he asks either. This is an example of stupid stupid dummy programming and I want it stopped.

    Well intentioned? Yes. Extremely stupid? You bet.

    And if your answer is it's a virus so don't ' announcement of the sentence. If there's a post on it is caused by a virus, I want all users to disregard this post cause it is trying to sell her unwanted removal of malicious software. My computer is clean!

    Whenever I have select multiple photos to download or move somewhere and I get to a number of selected images, Windows, or everything he does makes copies of selected images. It's a stupid program because it does not check to see if a copy had already been made and he asks either. This is an example of stupid stupid dummy programming and I want it stopped.

    Well intentioned? Yes. Extremely stupid? You bet.

    And if your answer is it's a virus so don't ' announcement of the sentence. If there's a post on it is caused by a virus, I want all users to disregard this post cause it is trying to sell her unwanted removal of malicious software. My computer is clean!

    =========================================
    Unwanted copies have "copy of" appended to the file?

    If_Yes_read the following...

    Sometimes most of the person who
    trying to select multiple by holding the CTRL
    or the SHIFT key down while clicking on the left to select the
    image files.

    Copies are created when you are unable to
    completely release the mouse button before
    you move the pointer to another file. When a group
    the selected file is dragged... even the slightest
    release the mouse button will produce a bit...
    copies of all the files previously highlighted.

    It's a little easier if you have your folder
    Options set at single click... that way you can
    select/deselect a file with just a mouse more
    and you don't have to click. For multiples you
    I have to keep... CTRL or Shift.

    Do not click on... no slip... no copy... maybe that of
    your solution. To adjust the click...
    Open a folder and go... Tools / folder
    Options / General tab... Check... 'single click '.
    To open an item"/ apply / OK.

    If you want to delete all the files in a folder
    You can try the following:

    Reach... Edition / select all... or type... CTRL / has...

    With all of the files selected... go... Drop / delete...
    or press your delete key... or... click on the
    Group and choose 'delete '.

    How do I find and remove unwanted 'copies '.
    of your image files.

    Open the folder that the images are saved in and
    on the left, click on the button 'Search' in your toolbar.

    (If you view the files from a montage
    program and do not know where the record is... right
    Click on one of the image files and the menu...
    choose... Properties. The path to the folder will be
    in the tab 'General' to 'Place').

    In the research pane select... "All files and folders".

    In the "All or part of the file name" field. Come in...

    a copy of

    Now... on the left, click on the search"" button.

    When the search is complete... go to... Edition / select all...

    Then go to... Remove / delete.

    You will see a dialog box asking if you are sure
    you want to delete the files, click Yes.

    Now... on the left, click on the 'Back' button in your toolbar.

    Now the remaining files should be your originals.

    If you delete the wrong files... recover from
    your basket now.

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • When I send a large file, it repeats (sends) again and again until I delete it from the Outbox, it is a virus, a problem of microsoft or roadrunner?

    When I send a large file, it repeats (sends) again and again until I delete it from the Outbox, it is a virus, a problem of microsoft or roadrunner?

    Hi thxfour,

    Got your problem about sending large files by e-mail.
    If I'm just guessing you use a such as MS Outlook or Outlook Express e-mail client!
    If Yes, then,.
    I inform you that the as soon as you click on the button to send your e-mail client. The content of this particular mail sending process begins. The process continues until the last byte of data is transferred. Now, email clients (almost all) are designed to send the contents of a mail only once and not resumeable parts. Now, each time while you send mail with the content inside, it must go in one piece. However, if there is some sort of interruption in the internet connection, the content is not completely transferred. The remains of mail in the Outbox and automatically transfer begins as soon as the internet connection resumes. When the mail is deleted from the Outbox send is stopped because the source is no longer available.

    This thing happens generally when sending large files on a slow speed or internet medium given that the execution time is more emails compared to normal.
    Run time means more chances to get an interruption in internet connectivity.

    * It is advisable to use an application to transfer files to transfer large files over the internet instead of emails. File transfer can transfer large files (in GB), and if there is no interruption in the internet connection, you can resume the download.

    Best regards

Maybe you are looking for

  • No need for Modules common Win XP for Satellite A205-SP4068

    Hello I have a TOSHIBA * A205-model No. SP4068 * PSAF0U-08X01X * and I need the "commom modules" for Win XP PRO SP3. -. where can I download it? Thank you and best regards, Gort

  • Bluetooth Linux on IdeaPad Z580

    I was wandering if someone managed to get the Bluetooth works on Linux on the Z580. I'm a Linux user for a long time, but I still have to use a computer with bluetooth in there. I have no experience with Bluetooth on computers I know in fact I ordere

  • How to get rid of google redirect virus?

    A few days ago, I had miexece.exe housing soon on arise, but soon it went away, and now I have this google redirect virus. I tried to look at other reviews, but I couldn't find this contraption tds and disable, but I'll buy a new released antivirus s

  • HP Touchsmart TX2 (ea 1340) - is there a TPM chip?

    Hello I am trying to determine if my laptop - which is a HP Touchsmart TX2 (ea 1340) - has a TPM chip installed? I start work as an entrepreneur with a new company, and their IT service wondering if my laptop has such a TPM chip, I think that it is n

  • libxml is included?

    include libxml files exist in the NDK, but the library itself does not seem to exist. So, when I compile it compiles fine, but when I go to debug (and likely export) application, QCC fails saying it can't find libxml. The missing library by accident