VBScript That Datastamps Log Files

See how one reader renames a file by date when handling accumulative log files.

Readers

February 13, 2001

1 Min Read
ITPro Today logo


For administrators who manage applications that generate accumulative log files, I have a way to rename a file by date. For example, Oracle creates an Alert log file that can grow quite large. I wrote a VBScript routine, which Listing 1 shows, that timestamps the log file and renames it with a filename that reflects the date Oracle created the log. The following wrapper batch file calls the script in Listing 1 so that you can use the At command to schedule the script to run

cscript datefile.vbs //nologo

—Larry Lai
[email protected]

About the Author(s)

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like