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:
where from field from file. In binary
- deletes some binary-plist prefix
- delete nulls at the end
- creates string from binary with xxd
- Gets the name of the contact from string.
- creates a folder for that contact
- 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.