- Oct 27, 2005
- 368
- 0
- 0
I poked around online to make a batch script to defrag both of my hard drives every week. This is what I came up with:
cd C:\windows\system32
defrag C: >C:\defrag.log 2>&1
defrag D: >>C:\defrag.log 2>&1
date /t >>C:\defrag.log
time /t >>C:\defrag.log
It outputs the analysis and defragmentation reports for both drives and then the last two lines output the date and time of completion. My question is simple and a little anal. How do I add a line break or two between the defrag output and the date/time?
cd C:\windows\system32
defrag C: >C:\defrag.log 2>&1
defrag D: >>C:\defrag.log 2>&1
date /t >>C:\defrag.log
time /t >>C:\defrag.log
It outputs the analysis and defragmentation reports for both drives and then the last two lines output the date and time of completion. My question is simple and a little anal. How do I add a line break or two between the defrag output and the date/time?