Change folder modified date mac

Similar to the Linux description above, the Mac also makes use the touch program via terminal software. Lets say you want to make the directory Myfolder have the date and time of January 8, at PM your time zone.

Popular Topics

Some of those softwares may take contributions. If you found one useful, then consider making a contribution to the developer as a simple thanks.

Thanks for subscribing!

If a Paypal contribution button is used, then it is as safe as the contribution button on my site, above left side , for contributions to Tech Notes. Look around, and you may find other useful articles. Consider submitting technical articles for publication, including your embedded links. I will even create a new category if needed.

macos - Mac OS change creation and last modification dates of a folder - Stack Overflow

Thank you for your donation. Most definitely appreciated. Paypal account not needed to donate. Leave your comments Login to post a comment. Remember me.

Register Forgot password. Note: It is always a good idea to first test on a small sample of the target files copied to another folder and check the results first, then proceed on the original files. One should also always have normal regular backups as well before proceeding, e. If you do not have GetFileInfo and want to use stat , then directly after do replace:. Note: This assumes you do have at least one. IMG file in the directory , otherwise it causes a non-fatal error, meaning nothing has changed:.

Home Questions Tags Users Unanswered. Change file creation date to modification date using terminal Ask Question.

"Touch" won't change file creation date -why?

Thanks in advance! What do you mean by "creation date"? And for the recursive part, use what anubhava suggested in his answer :. For those who don't have XCode or developer tools installed and so cannot use SetFile , see below. Then why touch changes creation time only some times?

Change The Creation Date of a File (#1254)

Reason is modification time cannot be lesser than creation time. So when we set modification time to a date before creation time, the creation time is also set to modification time. Two things now. SetFile works well with any date.

Post navigation

Learn more about Teams. Mac OS change creation and last modification dates of a folder Ask Question. Sindico Sindico 5, 6 6 gold badges 30 30 silver badges 75 75 bronze badges. Why 2 downvotes?

This is a perfect good question. This doesn't change the creation date as reported by the Finder, only the modification date observed on OS X