home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / qutil2.zip / qren.doc < prev    next >
Text File  |  1993-04-17  |  3KB  |  87 lines

  1.  
  2.  
  3.                        QREN (OS/2) - 1.00
  4.                           Documentation
  5.  
  6.     Copyright 1991-1993, Thomas G. Harold, All Rights Reserved.
  7.  
  8.  
  9.     QREN [-f] filename newname
  10.         -f - use filename's date/time stamp instead of the
  11.             current system time.
  12.         filename - This is the original filename
  13.         newname  - This is the new filename that QREN will use
  14.             when renaming the original filename.  This may 
  15.             include time/date codes as explained below.
  16.  
  17.     QREN is part of the QUTIL2 utilities package and may not be 
  18. distributed seperately.
  19.     QREN is a program that will allow you to rename files AND 
  20. directories using the current time and date information.  For 
  21. example if today was August 8, 1991, you could rename "TEST.DAT" 
  22. to "TS910808.DAT".  QREN can also be used as a replacement for
  23. the DOS REN command to rename directories.
  24.  
  25. -----------------------------------------------------------------
  26.  
  27. I.  Installation:
  28.  
  29.     Copy the qren.exe file to a directory in your PATH statement.
  30.  
  31. II. Usage:
  32.  
  33.     Usage of QREN will primarily be limited to batch files.  In 
  34. its simplest form, QREN performs the same task as the DOS REN 
  35. command.  However, QREN also allows you to embed date/time 
  36. information into the output filename so that you can keep 
  37. multiple copies of files based on the date and/or time that QREN 
  38. was run.
  39.     In order to embed date/time information into the output 
  40. filename, you need to include what are known as time format codes 
  41. to QREN.  For example:
  42.  
  43.         QREN test.dat test!j.!y
  44.  
  45.     This would rename "test.dat" to "testXXX.YY" where "XXX" is 
  46. the day of the year (with January 1st as day 001), and "YY" is 
  47. the actual year (e.g. "91").  We'll discuss the time format codes 
  48. a little later on.
  49.     The important thing to remember is that DOS has a limited 
  50. amount of space to store filenames.  So if you include a whole 
  51. bunch of codes, don't be surprised if DOS cuts everything after a 
  52. certain point.  (8 characters before the dot, 3 after the dot) 
  53.     The date format codes are the same as used in the ANSI C 
  54. guidelines for the strftime() function.  (Don't worry if you 
  55. don't have a copy of the ANSI C guidelines, or if you don't know 
  56. how to program in C, QREN will kindly print a list of the codes 
  57. if it is run without any arguments.)  All date format codes start 
  58. with a "!" followed by an upper or lower case letter.  (For the 
  59. ANSI C fans, DOS likes to interpret the '%' sign when used in a 
  60. batch file.)  If you need to place a '!' symbol into the 
  61. filename, you'll have to "double-up" the exclamation point.  
  62. (e.g. "!!")
  63.     Some sample string combinations are:
  64.         !H!M!S      - Hour, Minute, Second (time of day)
  65.         !y!m!d      - Year, Month, Day
  66.         !y!b        - Year, with abbreviated month.
  67.         !y!j        - Year, day of year
  68.         !U!w!h      - Week of year, day of week, hour of day.
  69.  
  70.     The "-f" option allows the use of the file's date/time 
  71. instead of the current system time.
  72.  
  73. -----------------------------------------------------------------
  74.  
  75. History:
  76.  
  77.         1.0     Aug 1991/Feb 1992
  78.             Original release as a stand-alone version.
  79.  
  80.         1.00    Oct 1992
  81.             Added to QUTIL1 toolkit.            
  82.             
  83.         1.00    Apr 1993
  84.             Ported to OS/2
  85.             
  86.  
  87.