Prepend filename, date & time to a txt file?

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Prepend filename, date & time to a txt file? Mon Aug 19, 2013 5:57 am • by Jono
I've tried using samples I've found here and other places but can't get this to work exactly as I'd like (as I know nothing about shell scripting).

What I want to do is copy the filename of files downloaded to the Downloads folder (on a different computer) along with the date and time added to a text file, with newest entries added at the top. So for example Download Files.txt would have following contents:

2013-08-19 10:25:11 AM
Archive 01.dmg
------------------------—--

2013-08-18 7:32:23 PM
app_update.pkg
------------------------—--

2013-08-17 8:56:42 AM
Wallpapers.zip
------------------------—--

The folder containing the note syncs in Dropbox, so would enable me to see what's been downloaded on a certain computer from my phone, a different computer etc.


Any help would be greatly appreciated.
Jono
 
Posts: 26
Joined: Wed May 09, 2012 5:52 am
Location: UK

Re: Prepend filename, date & time to a txt file? Sat Aug 24, 2013 6:29 pm • by Jono
I've now managed to do this, so don't need help anymore.

If anyone's interested in how to do this let me know. Otherwise feel free to delete the topic.
Jono
 
Posts: 26
Joined: Wed May 09, 2012 5:52 am
Location: UK

You can post in the Tips forum if you want.
Mr_Noodle
Site Admin
 
Posts: 11551
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Prepend filename, date & time to a txt file? Wed Aug 28, 2013 3:45 am • by Jono
OK, will do.
Jono
 
Posts: 26
Joined: Wed May 09, 2012 5:52 am
Location: UK


Return to Open Discussion