Add created date to contents of text file

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Add created date to contents of text file Tue Mar 02, 2021 2:29 pm • by eiff
Hello,

I'm trying to prepend the created date of a text file to the contents of the file.

So for example, let's say I have a text file 'Example.md' and the contents of the file is:

Code: Select all
Hello World


I'd like it to be modified to be:

Code: Select all
UID: 202103021127

Hello World


I am able to easily add the created date to the file NAME, but I'm stuck on how to add it to the file CONTENTS.

Any idea on how that might be achieved? Thanks so much!
eiff
 
Posts: 7
Joined: Mon Aug 20, 2012 8:14 pm

Re: Add created date to contents of text file Wed Mar 03, 2021 10:48 am • by Mr_Noodle
There are no built-in actions to modify the contents of files. You will need to use Automator or a script to do that type of thing.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support