mirror of
https://github.com/opsxcq/mirror-textfiles.com.git
synced 2025-08-18 09:31:19 +02:00
19 lines
898 B
Plaintext
19 lines
898 B
Plaintext
The following was taken from a message posted by Bat Lang in the BATPOWER
|
|
echo.
|
|
ST> Could someone please point out to me how to rename my file extensions
|
|
ST> to the Julian date. Such as having my batch automatically rename my
|
|
ST> daily backup from backup.arj to backup.168 for todays date.
|
|
|
|
The following can be found through BFDS, which will satisfy the above need.
|
|
JULIAN2.ZIP 5582 01-04-95 JULIAN returns the day of year(Julian)
|
|
using the system date, and inserts it into the
|
|
environment Variable 'JULIAN'.
|
|
So your batch file would run JULIAN, then there is a ENVAR called JULIAN
|
|
whose value is the current Julian date. Then you would follow that with
|
|
a statement like: Rename backup.ARJ *.%julian%. So your batch file
|
|
would only *need* to have these two lines:
|
|
|
|
Julian
|
|
ren backup.arj *.%julian%
|
|
|