You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
265 B
13 lines
265 B
#!/bin/bash
|
|
for folder in $(find . -maxdepth 1 -type d)
|
|
do
|
|
echo $folder
|
|
if [ $folder != "./2020" ] || [ $folder != "./2021"];
|
|
then
|
|
crdate=$(stat -c "%w" $folder)
|
|
month=${crdate:5:2}
|
|
year=${crdate:0:4}
|
|
mkdir -p $year"/"$month
|
|
cp -R $folder $year"/"$month"/"
|
|
fi
|
|
done
|