Use oSQL to run a query and save the output to a file that includes the date in the filename.
Tag: SQL Server
Auto-start Defragging a SQL Server
A VBScript that shuts down SQL Server and starts defragging the specified drives, assuming the SQL Server backups you want completed are done.