We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
'Defrags all drives Const LogFile = "f:\log\Defrag.log" Const DriveTypeRemovable = 1 Const DriveTypeFixed = 2 Const DriveTypeNetwork = 3 Const DriveTypeCDROM = 4 Const DriveTypeRAMDisk = 5 Set FSO = CreateObject("Scripting.FileSystemObject") Set Drives = FSO.Drives For each Drive in Drives if Drive.DriveType = 2 then RunCmd Drive end if Next Sub RunCmd(DriveString) Set WshShell = WScript.CreateObject("WScript.Shell") RunString = "%comspec% /c echo " & WeekDayName(WeekDay(Now), True) & " " & Now & " " & DriveString Return = WshShell.Run(RunString & " >> " & LogFile & " 2>&1", 0, TRUE) RunString = "%comspec% /c %WINDIR%\System32\Defrag.exe " & DriveString & " -f" Return = WshShell.Run(RunString & " >> " & LogFile & " 2>&1", 0, TRUE) Set WshShell = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Any tool or Script which can shows duplicated file based on its size in File server ?||6||79|
|question about running backups||3||86|
|Time server on domain||3||22|
|Enabling flash installation using GPO||2||15|