home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / d2fn103.zip / d2fn.doc next >
Text File  |  1997-04-13  |  3KB  |  82 lines

  1.  
  2. D 2 F N
  3.  
  4. Date 2 File Name
  5.  
  6.  
  7. Copyright (c) 1997 by Warren Mann
  8.  
  9.  
  10.  
  11. MANUAL
  12.  
  13. This program reads the current date from the system and uses it to change the
  14. name of a specified file(s).  The format of the new name can be given on the
  15. command line.
  16.  
  17. To run D2FN from the command prompt, enter:
  18.  
  19.     D2FN file_name.ext
  20.  
  21. Where file_name is the name of the file to change.    This will rename the file(s)
  22. named file_name to yy-mm-dd.ext, where yy is 2 digits representing the current
  23. year, mm is 2 digits representing the current mont, dd is 2 digits representing
  24. the current day and .ext is the extension of file_name.  This is the default
  25. format for the date string used as the new file name.
  26.  
  27. To change the format of the date string, us the -F switch (-f works also):
  28.  
  29.     D2FN -fd-m-y file_name
  30.  
  31. This will rename the file(s) named file_name to dd-mm-yy.ext, where dd, mm and
  32. yy have the same representations as above.    Any character allowed in an os/2
  33. file name may be used in the -F option and will be used in the new file name,
  34. verbatim.  The following characters are interpreted specially by D2FN and will
  35. be replaced by numeric values in the new file name:
  36.  
  37.     d .... replaced with exactly 2 digits representing the current day
  38.     m .... replaced with exactly 2 digits representing the current month
  39.     y .... replaced with exactly 2 digits representing the current decade (94)
  40.     yy ... replaced with exactly 4 digits representing the current year (1994)
  41.  
  42. specifying an extension, for example ".extension", in the format specification 
  43. sets the new name-extension to ".extension", otherwise the new extension is the 
  44. same as the old extension.     A period with nothing following it will set the new
  45. extension to nothing: "mm-dd-yy."  Note that "extension" means anything
  46. following the first '.' in the filename, including all subsequent '.'.
  47.  
  48. The -F option affects only the files following it on the command line, so:
  49.  
  50.     D2FN file_name1.ext1 -fd-m-y.bak file_name2.ext2
  51.  
  52. will result in file_name1.ext1 being renamed mm-dd-yy.ext1 and file_name2.ext2
  53. being renamed dd-mm-yy.bak.
  54.  
  55. That pretty much wraps up the complexities of D2FN usage.     This program may be
  56. freely passed around and I do not ask for any sort of reimbursement.
  57.  
  58.  
  59. Any questions, comments or suggestions are welcome:
  60.  
  61.     Warren Mann
  62.     broken@sound.net
  63.  
  64.  
  65.  
  66. REVISION HISTORY
  67.  
  68. Version 1.00, 15.02.1997
  69.     initial release.
  70.  
  71. Version 1.02, 03.04.1997
  72.     os/2 port from pc-dos original.
  73.  
  74. Version 1.03, 12.04.1997
  75.     changed to use os/2 file i/o and custom integer to string conversion to knock 
  76.      30k off executable size.
  77.  
  78.  
  79.  
  80. ENJOY!
  81.  
  82.