File "time.sh"
Full path: /home2/vzaccfyi/domains/vz.acc.fyi/private_html/photos/4K Stogram/time.sh
File size: 459 bytes
MIME-type: text/plain
Charset: utf-8
Download Open Edit Advanced Editor Back
#!/bin/bash
directory="/home/myig/public_html/photos/4K Stogram"
function iterate() {
local dir="$1"
for file in "$dir"/*; do
if [ -f "$file" ]; then
fullfile=$file
file="${file##*/}"
# echo "$file"
date="${file:0:4}${file:5:2}${file:8:2}0100"
# echo $date
touch -amt $date "$fullfile"
echo $fullfile: $date
fi
if [ -d "$file" ]; then
iterate "$file"
fi
done
}
iterate "$directory"