- Code: Select all
$HOME/Downloads/YYYY.MM.DD
- Code: Select all
$HOME/Downloads/YYYY/YYYY.MM/YYYY.MM.DD
Note, that on, let's say, January 1st, 2023 folders $HOME/Downloads/2023 and $HOME/Downloads/2023/2023.01 does not exists, so I can't use Move and then sort; there is no Create directory and I'm pretty sure I don't want to have three step sorting (i.e first sort into subfolder 2023, then into 2023/2023.01 and then finally into 2023/2023.01/2023.01.01).
If I will create folder using script below, how do I move file into this folder then?
- Code: Select all
mkdir -p "$HOME/Downloads/$(date +%Y)/$(date +%Y.%m)"
This suggests, that instead of this, I can probably modify script to
- Code: Select all
p="$HOME/Downloads/$(date +%Y)/$(date +%Y.%m)/$(date +%Y.%m.%d)"
mkdir -p "${p}"
mv "$1" "${p}"
But I hope, there is a native Hazel way, which I can't seem to see... Help me..