todayprefix

Package: WA2L/WinTools 1.2.08
Section: General Commands (1)
Updated: 07 February 2019
Index Return to Main Contents

 

NAME

todayprefix - add the date as prefix to the file name

 

SYNOPSIS

WA2LWinTools/bin/todayprefix [ -h | -i | -u | -V ]

todayprefix file...

 

AVAILABILITY

WA2L/WinTools

 

DESCRIPTION

when the todayprefix is called without pressing any special key, it prepends the current date ( 20150128 - filename.ext ) to the file name.

When the SPACE key is pressed during command execution, the resulting file is 201501282359 - filename.ext .

When the SHIFT key is pressed during command execution, the resulting file is 2015-01-28 - filename.ext .

When the LEFT CONTROL key is pressed during command execution, the resulting file is 28012015 - filename.ext .

When the RIGHT CONTROL key is pressed during command execution, the resulting file is 28-01-2015 - filename.ext .

The given file is renamed, if there is not already a file with the same name.

Files having already a date prefix of another date are renamed to the current date.

Examples (executed on January 28th, 2015) without pressing any other key:

  Reservation.docx           ==>  20150128 - Reservation.docx
  20150115 - ToDo List.xlsx  ==>  20150128 - ToDo List.xlsx
  201501151345 - Image.png   ==>  20150128 - Image.png
  2015-01-15 - Report.docx   ==>  20150128 - Report.docx
  15012015 - Logbook.docx    ==>  20150128 - Logbook.docx
  15-01-2015 - Agenda.docx   ==>  20150128 - Agenda.docx

Examples (executed on January 28th, 2015, 23:59) when pressing the SPACE key:

  Reservation.docx           ==>  201501282359 - Reservation.docx
  20150115 - ToDo List.xlsx  ==>  201501282359 - ToDo List.xlsx
  201501151345 - Image.png   ==>  201501282359 - Image.png
  2015-01-15 - Report.docx   ==>  201501282359 - Report.docx
  15012015 - Logbook.docx    ==>  201501282359 - Logbook.docx
  15-01-2015 - Agenda.docx   ==>  201501282359 - Agenda.docx

Examples (executed on January 28th, 2015) when pressing the SHIFT key:

  Reservation.docx           ==>  2015-01-28 - Reservation.docx
  20150115 - ToDo List.xlsx  ==>  2015-01-28 - ToDo List.xlsx
  201501151345 - Image.png   ==>  2015-01-28 - Image.png
  2015-01-15 - Report.docx   ==>  2015-01-28 - Report.docx
  15012015 - Logbook.docx    ==>  2015-01-28 - Logbook.docx
  15-01-2015 - Agenda.docx   ==>  2015-01-28 - Agenda.docx

Examples (executed on January 28th, 2015) when pressing the LEFT CONTROL key:

  Reservation.docx           ==>  28012015 - Reservation.docx
  20150115 - ToDo List.xlsx  ==>  28012015 - ToDo List.xlsx
  201501151345 - Image.png   ==>  28012015 - Image.png
  2015-01-15 - Report.docx   ==>  28012015 - Report.docx
  15012015 - Logbook.docx    ==>  28012015 - Logbook.docx
  15-01-2015 - Agenda.docx   ==>  28012015 - Agenda.docx

Examples (executed on January 28th, 2015) when pressing the RIGHT CONTROL key:

  Reservation.docx           ==>  28-01-2015 - Reservation.docx
  20150115 - ToDo List.xlsx  ==>  28-01-2015 - ToDo List.xlsx
  201501151345 - Image.png   ==>  28-01-2015 - Image.png
  2015-01-15 - Report.docx   ==>  28-01-2015 - Report.docx
  15012015 - Logbook.docx    ==>  28-01-2015 - Logbook.docx
  15-01-2015 - Agenda.docx   ==>  28-01-2015 - Agenda.docx

 

OPTIONS

-h
usage message.

-i
install the todayprefix command as menu point 'todayprefix' to the 'Send To' context menu in 'Windows Explorer'.

-u
uninstall the todayprefix shortcut from the 'Send To' context menu in 'Windows Explorer'.

-V
print program version.

file...
list of files to add the prefix to. When installed in the 'Send To' menu the selected file(s) in 'Windows Explorer' are passed as a list of files to the todayprefix command.

 

ENVIRONMENT

-

 

EXIT STATUS

0
no error.

4
usage message displayed.

5
version message displayed.

 

FILES

etc/todayprefix.cfg
optional configuration file for todayprefix.

When the setting SEPARATOR is set to False, no separator between the date and the file is put.

Default is SEPARATOR=True what does mean that the dash ( - ) is put between the date and the file as demonstrated in the examples above.

  #
  # todayprefix.cfg - Configfile for todayprefix
  #
  # [00] 11.02.2019 CWa   Initial Version
  #

  SEPARATOR=False

 

EXAMPLES

-

 

SEE ALSO

wintoolsintro(1), sav(1), savnow(1), todayprefix.cfg(4), config(1m), vcp(1)

 

NOTES

-

 

BUGS

-

 

AUTHOR

todayprefix was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2020 Christian Walther

This is free software; see WA2LWinTools/man/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 16:33:09 GMT, September 14, 2024