Skip to content

Instantly share code, notes, and snippets.

@supremebeing7
Created November 14, 2016 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supremebeing7/e7ffff956aad68e93990455d7059b77c to your computer and use it in GitHub Desktop.
Save supremebeing7/e7ffff956aad68e93990455d7059b77c to your computer and use it in GitHub Desktop.
Set file modified date to creation date for fileset
# This doesn't work in its current form... I don't remember what the problem is
for i in $( ls ); do
if [ "$i" == "DSC_0518.JPG" ]; then
modified=\"$(GetFileInfo -m $i)\"
SetFile -d \'$modified\' $i
fi
done
count=1
for i in $( ls ); do
SetFile -d "12/03/2013 14:00:0$count" $i
(( count++ ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment