Copying Folder Names

Posted:
in Genius Bar edited August 2015

I need to Copy a long list of Folder names in Mavericks. Just the Folder names, not the contents. Someone asked this on AI in '03, but it wasn't answered. Googling doesn't seem to produce an answer either. 

Any suggestions?

 

Thanks

Comments

  • Reply 1 of 4
    SpamSandwichSpamSandwich Posts: 33,407member
    sequitur wrote: »
    I need to Copy a long list of Folder names in Mavericks. Just the Folder names, not the contents. Someone asked this on AI in '03, but it wasn't answered. Googling doesn't seem to produce an answer either. 
    Any suggestions?

    Thanks

    That sounds like a job for Automator or Terminal...neither in which I am well-versed.
  • Reply 2 of 4
    MarvinMarvin Posts: 15,322moderator
    sequitur wrote: »
    I need to Copy a long list of Folder names in Mavericks. Just the Folder names, not the contents. Someone asked this on AI in '03, but it wasn't answered. Googling doesn't seem to produce an answer either. 
    Any suggestions?

    Thanks

    If the folders are not in a hierarchy, you can open a new file in TextEdit, use Format menu > make plain text and just drag the list of folders in. You can then do either a find/replace to remove the first parts of the pathnames and slashes or hold the alt-key before clicking to select and do a vertical selection and delete that selection.

    If the folders are in a hierarchy, you can use the terminal:

    find *drag folder in* -type d

    If you want to save the output to a file, you can do e.g:

    find ~/Desktop -type d > ~/Desktop/foldernames.txt
  • Reply 3 of 4
    sequitursequitur Posts: 1,910member

    Your first suggestion worked fine. I didn't need to use Terminal. However, I should have explained that I wanted to use the list of Folder names in a Column on a connected computer to add Files in each Folder. . Do you have a fix for that?

  • Reply 4 of 4
    MarvinMarvin Posts: 15,322moderator
    sequitur wrote: »
    I should have explained that I wanted to use the list of Folder names in a Column on a connected computer to add Files in each Folder. . Do you have a fix for that?

    Do you mean you wanted to duplicate a column of folders onto a remote computer but empty? There are a few options for copying folders here but all involving code or the terminal:

    http://forums.appleinsider.com/t/76756/copy-folder-structure-without-copying-files

    If the contents of the folders aren't too large, you can duplicate the list somewhere then use Spotlight to find any files inside (making sure to limit the search to the duplicates) and move those to trash, then you'd have the folders left and can copy those.
Sign In or Register to comment.