File explorer/Finder like tool for mac os, which can sort folders by name

finderfoldersterminal

I couldn't figure it out how to sort folders by "name" in Finder. Now I know, that it's not possible. At least, according to what I think of, when I say sort by name. So I guess I need another tool.

Substrings of digits are sorted according to their numeric value, as
opposed to sorting the actual characters in the number.

Documentation

My task is, to go trough hundreds of folders alphabetically, and look at an image within each folder, and check for errors.

My workflow currently is:

  1. Copy the output of ls -la into excel
  2. get the folder names
  3. copy each row one by one into finder's search box
  4. check the contents of the folder
  5. I have a "notes" column in excel, where I can write my results

This is very tedious.

I would like to get the same sorting logic, as within in terminal.

Here are some sample folder names:

ls -la

...

0629e7bc-8110-4db9-aaa9-b67b0b73743d
06a409e1-98c6-4bf4-afa4-c814f7899d82
0a3a5c12-e459-4aa0-b9cb-30b544013215
0c14581f-31d8-4961-a14f-11afc40e47f9
0fe8970c-6338-46ca-bc16-f7867b271480
129855c4-7dbe-4a9f-a100-28b1d3d02340
1522e288-8a81-4298-aefc-f334cb088a53
180d430b-76f9-401f-845a-cb395bc1eba0
1a01a936-bedf-4758-971a-d4886ee8d281

folders in Finder

Could you recommend a tool, which can sort folders by name, alphabetically?
I've tried Commander One, but sadly, it's using the same logic as Finder.

Best Answer

I hope running this python script works. TEST would have all the folders you mentioned. I have modified the workflow slightly to avoid messing with Finder and AppleScript. The final file can be opened in Excel.

import os
import fnmatch

import time
directory = "your/dirname/Desktop/TEST"
y = [x[0] for x in os.walk(directory)] 
y = y[1:]

#%%
thedict = {}
for one in y:
    thedict[one] = ""
#makes dictionary with all the folder names
for direc in thedict:
    matches = []
    for root, dirnames, filenames in os.walk(direc):
        for filename in fnmatch.filter(filenames, '*.jpg'):
            matches.append(os.path.join(root, filename)) 
    for photo in matches:
        stri = "open " + photo
        os.system(stri)
        error = raw_input("error?")
        thedict[direc] = error
#Photo opens, you see it, close it, type the error in terminal and hit #enter.
#Then the next one comes up.
import csv
with open('outputf.csv', 'w') as f:
    for key in thedict.keys():
        f.write("%s,%s\n"%(key,thedict[key]))
Related Question