Create makedir_copyfiles.sh

This commit is contained in:
2020-02-09 00:21:36 -06:00
committed by GitHub
parent 8f2df085bb
commit d7540c66ee

12
makedir_copyfiles.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
input_dir="/media/tomove"
for file in $input_dir/*.* ; do
dir="${file%.*}"
mkdir -- "$dir"
mv -- "$file" "$dir"
done