I always wondered why skype don't put all my accepted downloads in subfolders with the name of my contacts!

If anybody have own solutions, share)

1 Answer 1


So I made a script and saved it as a folder action:

for f in "$@"
    userFolder=~/Downloads/Skype/`xattr -p com.apple.metadata:kMDItemWhereFroms "$f" | sed -e 's/0D//g' -e 's/.*\(5F 10\)...//' -e 's/00.*//'| xxd -r -p | sed -e 's@ (.*@@g'`
    mkdir -p "$userFolder"
    mv "$f" "$userFolder"

What it does:

  1. gets where from field from file. In binary
  2. deletes some binary-plist prefix
  3. delete nulls at the end
  4. creates string from binary with xxd
  5. Gets the name of the contact from string.
  6. creates a folder for that contact
  7. moves file there.

If you have more elegant solution, I would be glad to see them :)
P.S. if you didn't know about where from filed you can find it in get info for some finder items.

To categorize existing downloads you can also add service.

  • just so I understand... this will trigger after the file downloads automatically in the default "Downloads/Skype" folder, then your folder action triggers, running your script which then moves the file into the /username(d) folder, which your script creates if it doesn't exist - correct? Dec 16, 2013 at 14:21
  • Yes, correct. But later I found that it can work incorrect with some nicknames. Be careful.
    – DanSkeel
    Dec 17, 2013 at 13:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .