Update launch scripts to sort storage by input/output and year

This commit is contained in:
2018-06-19 21:32:30 -04:00
parent 9a76ced230
commit 6702834204
4 changed files with 29 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
for file in *; do
## Skip unless this is a file
if [ -f "$file" ]; then
## get the first four characters from filename, aka the year
target="${file:0:4}"
## Create the target directory if it doesn't exist
[ -d "$target" ] || mkdir "$target" 2>/dev/null
## Move the current file
mv "$file" "$target" 2>/dev/null
fi
done