Skip to content

Instantly share code, notes, and snippets.

@cmittendorf
Created May 13, 2017 08:18
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 cmittendorf/732e7ad4c9114cd24fda91aa3fd2c5ed to your computer and use it in GitHub Desktop.
Save cmittendorf/732e7ad4c9114cd24fda91aa3fd2c5ed to your computer and use it in GitHub Desktop.
A script for macOS which copies the created date from one file to another.
#!/usr/bin/env bash
if [ $# != 2 ]; then
echo `basename $0`" <src file> <dst file>"
exit
fi
SetFile -d '$(GetFileInfo -m "$1")' "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment