Where do Folder Action Setup Settings live?

Discussion in 'Mac Programming' started by VideoBeagle, Sep 24, 2015.

  1. VideoBeagle macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #1
    I'm thinking this is something programmer types might know more...

    Where do the settings for Folder Action Setup live? Not the actions themselves, but the information on what folder uses what action...Is there somewhere outside of the Setup program itself?
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    Which OS version? A correct answer may depend on your OS version.

    Try here:
    ~/Library/Preferences/com.apple.FolderActions.plist

    How I discovered this file:
    1. Open ~/Library/Preferences in Finder.
    2. View by Date Modified (most recent first).
    3. Right-click a folder in Finder.
    4. Choose "Configure Folder Actions..." (or whatever it's named now)
    5. Enable and disable Folder Actions.
    6. Observe what file shows up at top of list in Preferences.
     
  3. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #3
    That did it!...and now I feel dumb that I didn't think of that way to figure it out.
    This reimage has been a royal pita.
     
  4. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #4
    Hmm Unfortunately, the data, which I assume holds the info on what folder they're attached to is..if not encyrpted, then coded, so can't just be edited there. Oh well. (I realized the real problem isn't the moving to a new image, but that I previously had moved where a number of the folders were located and never updated this on the old image :0

    Code:
                <data>
                AAAAAAF2AAIAAQpQb3NlckRyaXZlAAAAAAAAAAAAAAAAAAAAAADO
                NUCHSCsAAAANmCULRXhwcmVzc2lvbnMAAAAAAAAAAAAAAAAAAAAA
                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2Z
                P9BLgukAAAAAAAAAAP////8AAAkAAAAAAAAAAAAAAAAAAAAADkFj
                dGl2ZSBDYXRhbG9nABAACAAAzjWU5wAAABEACAAA0EvXSQAAAAEA
                CAANmCUADZ2OAAIALlBvc2VyRHJpdmU6QWN0aXZlOgBBY3RpdmUg
                Q2F0YWxvZzoARXhwcmVzc2lvbnMADgAYAAsARQB4AHAAcgBlAHMA
                cwBpAG8AbgBzAA8AFgAKAFAAbwBzAGUAcgBEAHIAaQB2AGUAEgAi
                L0FjdGl2ZS9BY3RpdmUgQ2F0YWxvZy9FeHByZXNzaW9ucwATABMv
                Vm9sdW1lcy9Qb3NlckRyaXZlAP//AAA=
                </data>
     
  5. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #5
    I'm pretty sure that's BASE64 encoding of an alias record.

    1. I copied and pasted it into a plain text file. (use TextEdit or TextWrangler)
    2. I stripped the leading spaces from each line.
    3. I saved the file in my home folder.
    4. I opened a Terminal window.
    5. I pasted in this command:
    Code:
    base64 -D <b64.txt | hexdump -C
    6. It produced this output:
    Code:
    00000000  00 00 00 00 01 76 00 02  00 01 0a 50 6f 73 65 72  |.....v.....Poser|
    00000010  44 72 69 76 65 00 00 00  00 00 00 00 00 00 00 00  |Drive...........|
    00000020  00 00 00 00 00 00 ce 35  40 87 48 2b 00 00 00 0d  |.......5@.H+....|
    00000030  98 25 0b 45 78 70 72 65  73 73 69 6f 6e 73 00 00  |.%.Expressions..|
    00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    *
    00000070  00 00 00 0d 99 3f d0 4b  82 e9 00 00 00 00 00 00  |.....?.K........|
    00000080  00 00 ff ff ff ff 00 00  09 00 00 00 00 00 00 00  |................|
    00000090  00 00 00 00 00 00 00 00  00 0e 41 63 74 69 76 65  |..........Active|
    000000a0  20 43 61 74 61 6c 6f 67  00 10 00 08 00 00 ce 35  | Catalog.......5|
    000000b0  94 e7 00 00 00 11 00 08  00 00 d0 4b d7 49 00 00  |...........K.I..|
    000000c0  00 01 00 08 00 0d 98 25  00 0d 9d 8e 00 02 00 2e  |.......%........|
    000000d0  50 6f 73 65 72 44 72 69  76 65 3a 41 63 74 69 76  |PoserDrive:Activ|
    000000e0  65 3a 00 41 63 74 69 76  65 20 43 61 74 61 6c 6f  |e:.Active Catalo|
    000000f0  67 3a 00 45 78 70 72 65  73 73 69 6f 6e 73 00 0e  |g:.Expressions..|
    00000100  00 18 00 0b 00 45 00 78  00 70 00 72 00 65 00 73  |.....E.x.p.r.e.s|
    00000110  00 73 00 69 00 6f 00 6e  00 73 00 0f 00 16 00 0a  |.s.i.o.n.s......|
    00000120  00 50 00 6f 00 73 00 65  00 72 00 44 00 72 00 69  |.P.o.s.e.r.D.r.i|
    00000130  00 76 00 65 00 12 00 22  2f 41 63 74 69 76 65 2f  |.v.e..."/Active/|
    00000140  41 63 74 69 76 65 20 43  61 74 61 6c 6f 67 2f 45  |Active Catalog/E|
    00000150  78 70 72 65 73 73 69 6f  6e 73 00 13 00 13 2f 56  |xpressions..../V|
    00000160  6f 6c 75 6d 65 73 2f 50  6f 73 65 72 44 72 69 76  |olumes/PoserDriv|
    00000170  65 00 ff ff 00 00                                 |e.....|
    
    That's probably enough to reconstruct which folder the alias record originally referred to.
     
  6. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #6
    Yep..the info's there...not sure how I'd edit it though...I mean, I guess change each line to ascii as you did, make the edits, convert back...

    But at this point, just fixing it in Setup will be a lot quicker :)

    Thanks!
     
  7. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    I don't think any edit would work. The contents of an alias record is private and undocumented. Best case you'll get some pathnames or pathname fragments out of it. Worst case it's nothing comprehensible.

    https://en.wikipedia.org/wiki/Alias_(Mac_OS)#Alias_record_structure_outside_of_size_length

    There's a difference between an alias record, which is basically an opaque memory structure, and an alias file, which contains an alias record and other things.
     
  8. VideoBeagle thread starter macrumors 6502a

    Joined:
    Aug 17, 2010
    Location:
    App Q&A testing by request.
    #8
    So regardless if I can read the data block, I'd need to manually change the folder setup in the folder setup program anyway....which I've done:)
    Thanks for the input!
     

Share This Page