Is there a simple way (maybe a script), to automatically insert the current date into the filename of a newly created document either in nautilus or in Libreoffice?
A function like that would be useful for me, since I produce a lot of documents and sort them by making their names start with the date of their creation.
Nautilus-actions or Nautilus scripts may help. You could get something like a "timestamp" command in the contextual menu. Nautilus-actions lets you choose which file types will have the command available.
Nautilus-actions is available in software-center and then in settings menu. Nautilus scripts are those stored in "~/.gnome2/nautilus-script"
Doing so, your files won't be automatically timestamped, but the job will be easier.
Put this code into a file (e.g. add_date) move it to the
~/.gnome2/nautilus-script
directory. Perhaps you need to add execute permissin (chmod a+x add_date
). If you rightclick on a file in nautilus, you can append the date before the file name like in How can I write nautilus scripts in Python. The format can be changed in the row beginning withprefix =
(strftime formatting)Unfortunately, no. You can however rename the files using a batch renaming program (those are numerous in the Software Centre).