home *** CD-ROM | disk | FTP | other *** search
- ' STMPFILE.BAS
- ' by Tika Carr
- '
- ' Donated to the public domain
- ' No warranties or guarantees are expressed or implied.
- '
- ' Purpose: Rename file to a two-letter ID and time/date stamp
-
- DECLARE SUB StmpFile (NewKey$, File$)
-
- '**** To Use as a command line utility: Parse for two options:
- '
- 'i = INSTR(COMMAND$, " ")
- 'NewKey$ = LEFT$(COMMAND$, i - 1)
- 'File$ = RIGHT$(COMMAND$, LEN(COMMAND$) - i - 1)
- 'StmpFile NewKey$, File$
-
- '**** Use as a subroutine in programs, just use the last line above or:
- 'StmpFile "NV", "TEST.DOC"
-
- SUB StmpFile (NewKey$, File$)
- D$ = DATE$
- F$ = LEFT$(NewKey$, 2) + RIGHT$(D$, 2) + LEFT$(D$, 2) + MID$(D$, 4, 2) + RIGHT$(File$, 4)
- NAME File$ AS F$
- END SUB
-
-