Tell me more ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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)

share|improve this question

1 Answer

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

for f in "$@"
do
    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"
done

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.