Change "date added" attribute of a file

Hello!


I have been using Terminal to change the "date added" attribute of a file without success.

What I'm doing is:


#1. Display the attributes of a file:

mdls file_name


#2. Display the "date added" attribute:
xattr -p "kMDItemDateAdded" file_name


#3. Change it:

sudo xattr -w "kMDItemDateAdded" "201111111111.11" file_name


The third instruction does not work! Where as touching the file with the same date value DOES change date modified.

Any ideas from the community?


Kind regards,

Elias.

MacBook Pro, OS X Yosemite (10.10.5), null

Posted on Sep 25, 2016 1:49 AM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Change "date added" attribute of a file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.