home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
qutil2.zip
/
qren.doc
< prev
next >
Wrap
Text File
|
1993-04-17
|
3KB
|
87 lines
QREN (OS/2) - 1.00
Documentation
Copyright 1991-1993, Thomas G. Harold, All Rights Reserved.
QREN [-f] filename newname
-f - use filename's date/time stamp instead of the
current system time.
filename - This is the original filename
newname - This is the new filename that QREN will use
when renaming the original filename. This may
include time/date codes as explained below.
QREN is part of the QUTIL2 utilities package and may not be
distributed seperately.
QREN is a program that will allow you to rename files AND
directories using the current time and date information. For
example if today was August 8, 1991, you could rename "TEST.DAT"
to "TS910808.DAT". QREN can also be used as a replacement for
the DOS REN command to rename directories.
-----------------------------------------------------------------
I. Installation:
Copy the qren.exe file to a directory in your PATH statement.
II. Usage:
Usage of QREN will primarily be limited to batch files. In
its simplest form, QREN performs the same task as the DOS REN
command. However, QREN also allows you to embed date/time
information into the output filename so that you can keep
multiple copies of files based on the date and/or time that QREN
was run.
In order to embed date/time information into the output
filename, you need to include what are known as time format codes
to QREN. For example:
QREN test.dat test!j.!y
This would rename "test.dat" to "testXXX.YY" where "XXX" is
the day of the year (with January 1st as day 001), and "YY" is
the actual year (e.g. "91"). We'll discuss the time format codes
a little later on.
The important thing to remember is that DOS has a limited
amount of space to store filenames. So if you include a whole
bunch of codes, don't be surprised if DOS cuts everything after a
certain point. (8 characters before the dot, 3 after the dot)
The date format codes are the same as used in the ANSI C
guidelines for the strftime() function. (Don't worry if you
don't have a copy of the ANSI C guidelines, or if you don't know
how to program in C, QREN will kindly print a list of the codes
if it is run without any arguments.) All date format codes start
with a "!" followed by an upper or lower case letter. (For the
ANSI C fans, DOS likes to interpret the '%' sign when used in a
batch file.) If you need to place a '!' symbol into the
filename, you'll have to "double-up" the exclamation point.
(e.g. "!!")
Some sample string combinations are:
!H!M!S - Hour, Minute, Second (time of day)
!y!m!d - Year, Month, Day
!y!b - Year, with abbreviated month.
!y!j - Year, day of year
!U!w!h - Week of year, day of week, hour of day.
The "-f" option allows the use of the file's date/time
instead of the current system time.
-----------------------------------------------------------------
History:
1.0 Aug 1991/Feb 1992
Original release as a stand-alone version.
1.00 Oct 1992
Added to QUTIL1 toolkit.
1.00 Apr 1993
Ported to OS/2