Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Gravydog316

macrumors 6502a
Original poster
May 17, 2016
553
193
Canada
Hi does anyone know if there's a way to fix broken file & folder creation dates?

& also, how do I get folders to show the sizes, since it only works sometimes?

1703543539818.png
 

Bigwaff

Contributor
Sep 20, 2013
1,890
1,253
Is there something specific about the origin of these folders? Copied from the same external disk or network share?
 

gilby101

macrumors 68020
Mar 17, 2010
2,498
1,348
Tasmania
Creation date.

Hard way:
Sort answer: Use the setfile command from the command line tools.
Long answer: https://apple.stackexchange.com/que...mp-to-the-earlier-of-the-2-for-a-ton-of-files shows how to create an Automator workflow with a script which sets file creation and modification dates. You would want to change the logic to just set the creation date - most likely to same as modification. And note the comments about selecting folders, not files. Test with lots of care.

Easier way (GUI app):
Use A Better File Attributes https://www.publicspace.net/ABetterFinderAttributes/index.html (free trial) which has a method too copy the modification date to the creation date. Also a method to set the creation date to a specific date. Test with care.

Simple way:
Sorry, there isn't one.
 
Last edited:

NoBoMac

Moderator
Staff member
Jul 1, 2014
5,789
4,383
Sort answer: Use the setfile command from the command line tools.

Think you need to install Xcode for that.

% setfile
xcode-select: note: No developer tools were found, requesting install.

But, OP, per the Automator route, can use "touch" instead of "setfile" via command line. And can combine with "find" to traverse a whole directory structure, limit to name/extension, etc.

 

gilby101

macrumors 68020
Mar 17, 2010
2,498
1,348
Tasmania
Show folder sizes:

When browsing files in List view, go to View > Show View Option (also Command-J) and tick "calculate all sizes".

In a search, use Option-Command-I to show the inspector. That shows the size of the currently selected folder. I don't think you can show the size in the Finder search window.
 

NoBoMac

Moderator
Staff member
Jul 1, 2014
5,789
4,383
touch will modify create date.

Eg:
Code:
% echo "" > foo.txt
% touch -t 202212250000 foo.txt

Yields (Modified date, create date):

f1.png
f2.png

And with other switches, can change only modified, access
 

gilby101

macrumors 68020
Mar 17, 2010
2,498
1,348
Tasmania
touch will modify create date.
I think only when new modify date is earlier than current create date.

After following your example, try: touch -t 202212260000 foo.txt. Modify date is advanced to 26/12/22, but the create remains at 25/12/22.

The OP will be wanting to advance the create date, and likely without changing the modify. Hence setfile or ABetterFinderAttributes.
 
  • Like
Reactions: NoBoMac

Gravydog316

macrumors 6502a
Original poster
May 17, 2016
553
193
Canada
Is there something specific about the origin of these folders? Copied from the same external disk or network share?
No. They (& the other normal-dated folders & any new folders have correct dates are all on our external harddrive)
 

Gravydog316

macrumors 6502a
Original poster
May 17, 2016
553
193
Canada
Show folder sizes:

When browsing files in List view, go to View > Show View Option (also Command-J) and tick "calculate all sizes".

In a search, use Option-Command-I to show the inspector. That shows the size of the currently selected folder. I don't think you can show the size in the Finder search window.
Tried "calculate all sizes"; it only works sometimes.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.