Skip to content

Instantly share code, notes, and snippets.

@ik5 ik5/mv_recs.sh
Last active Dec 22, 2015

Embed
What would you like to do?
Take wav files from current directory and place them in directories based on month and day
#!/bin/bash
for i in *wav ; do
date=$(stat -c '%y' $i | cut -f 1 -d ' ' )
dir="${date:5:2}/${date:8:2}"
echo "$date $dir $i"
mkdir -p $dir
mv $i $dir
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.