Page 1 of 1

Prepend filename, date & time to a txt file?

PostPosted: 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.

Re: Prepend filename, date & time to a txt file?

PostPosted: 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.

Re: Prepend filename, date & time to a txt file?

PostPosted: Tue Aug 27, 2013 1:33 pm
by Mr_Noodle
You can post in the Tips forum if you want.

Re: Prepend filename, date & time to a txt file?

PostPosted: Wed Aug 28, 2013 3:45 am
by Jono
OK, will do.