6 Replies Latest reply: Dec 14, 2013 5:44 AM by jhla
jhla Level 1 Level 1 (0 points)

I have several hundred folders, each containing a number of subfolders.  I would like to create a workflow that will rename the subfolders so they contain the name of the parent folder.  No luck thus far...

  • Frank Caggiano Level 7 Level 7 (25,695 points)

    contain the name of the parent folder how? And how many levels?

  • jhla Level 1 Level 1 (0 points)

    Just one level.

     

    What I'm really trying to do is switch the order of my hierarchy.  The parent folders are project-specific, the subfolders contain content.  For example, I would like to change:

     

    New York

    - Images

    - History

    - Things to do

     

    Boise

    - Images

    - History

    - Things to do

     

    to:

     

    Images

    - New York

    - Boise

     

    History

    - New York

    - Boise

     

    Things to do

    - New York

    - Boise

     

    Just renaming them would be helpful enough, though.  Moving them into what will be three new folders isn't a big deal.

  • Frank Caggiano Level 7 Level 7 (25,695 points)

    Each parent folders contains the same named subfolders so that if you get the subs from one parent to make the new parents that will make all the new parents or do some of the parents have different subs?

     

    In other words if I take all the subs from New York and use those names to make new parents is that all there is or does Boise (or Boston or whatever) have different subfolders?

     

    Are there data files in the subfolders and do they have to be moved?

  • jhla Level 1 Level 1 (0 points)

    Yes the parent folders all contain the same folders (some do not contain all of the folders), but the names don't vary from parent folder to parent folder.  In otherwords Boise might not contain "Things to do" but it won't contain any uniquely named additional folders, such as "158th Anniversary Parade in Boise Center" or anything like that.

     

    Many of the subfolders do contain subfolders of their own -- I want to keep those in the subfolders they're currently in, but not rename them.  In otherwords they should move with the subfolder in question with no changes.

     

    Does that make sense?

  • Frank Caggiano Level 7 Level 7 (25,695 points)
    Many of the subfolders do contain subfolders of their own -- I want to keep those in the subfolders they're currently in, but not rename them.  In otherwords they should move with the subfolder in question with no changes.

     

    This is a bit murky.

     

    So you have

     

    New York

    - Images

    - History

    - Things to do

     

    and possibly

    Boise

    - Images

         - Nice Images <<<<<<

    - History

    - Things to do

     

    So how does that work out in the final set up?

     

    Like this

     

    Images

    - Nice Images <<<<<<

    - New York

    - Boise

     

    History

    - New York

    - Boise

     

    Things to do

    - New York

    - Boise

     

    or

     

    Images

    - New York

    - Boise

         - Nice Images <<<<<<

     

    History

    - New York

    - Boise

     

    Things to do

    - New York

    - Boise

     

     

    It's getting a bit evolved. Recreating the hirearcy isn't to much of a problem, moving the subfolders of the subfolders requires some thought.

     

    Message was edited by: Frank Caggiano - Also how much help do you need here, how much Applescript do you know? Do you just need some ideas to get going or do you need more than that?

  • jhla Level 1 Level 1 (0 points)

    I know essentially no applescript.  If I can simply rename the subfolders with the name of the parent folder that will be enough.  I can manually move the folders and preserve the structure.Your second example (below) is what I'd like in the end.

     

    Images

    - New York

    - Boise

         - Nice Images <<<<<<

     

    History

    - New York

    - Boise

     

    Things to do

    - New York

    - Boise

     

    ...but again, once they're renamed moving them will be quite easy to do manually.