Get file (modified) date in the YYYYMMDD format?

Is there any way to get the modification date of a file in the "YYYYMMDD" format? Other than writing a somehow complicated script that parses the output of "ls -l", which in the "May 15, 2009" format?


I have 1000+ files with no creation date but correct modification date. I want to set the creation date to modification date. It seems "touch -t YYYYMMDDhhmm filename" works fine, but I need to get the modification time first. I was hoping I could get it directly in the YYYYMMDD format, to make it easy.


Thanks in advance

macbook pro 2007, Mac OS X (10.6.7), iPhone 3GS and 4, iOS4.3

Posted on May 14, 2011 3:36 PM

Reply
8 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.

Get file (modified) date in the YYYYMMDD format?

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