Reading creation date from file an change
This will operate on all files in the Current Directory.
You could cd ~/MyDirectory, either in the script or in Terminal before running it.
Another option is to change the * in for f in *; do to ~/MyDirectory/*

This won't actually give you the creation time, because it isn't stored by Unix. Ctime actually records the time of the last status change (which may or may not be creation time).

OS X seems to store other data in extended attributes, but this is not what the script does.