nisa Posted July 18, 2006 Posted July 18, 2006 Small Script i wrote. comments and improvements are welcomed ! $Dir = "c:\Downloads" $Tr1 = Run(@ComSpec & ' /c dir /s /-c *.zip *.rar *.tar *.gz *.arj *.msi *.exe *.jar *.iso | find "File(s)" > %temp%\sums', $Dir, @SW_HIDE) $dirsize = DirGetSize($Dir, 1) ProgressOn("Progress", Round($dirsize[0] / 1024), $dirsize[1]) Do Sleep(1000) ProgressSet(Random(10, 90)) Until Not ProcessExists($Tr1) ProgressOff() RunWait(@ComSpec & ' /c for /f "tokens=1" %a in (%temp%\sums) do @echo %a > %temp%\nof', "", @SW_HIDE) RunWait(@ComSpec & ' /c for /f "tokens=3" %a in (%temp%\sums) do @echo %a > %temp%\sof', "", @SW_HIDE) FileDelete(@TempDir & '\sums') $file = FileOpen(@TempDir & '\nof', 0) $NumberOfFiles = FileReadLine($file) FileClose($file) FileDelete(@TempDir & '\nof') $file = FileOpen(@TempDir & '\sof', 0) $SizeOfFiles = FileReadLine($file) FileClose($file) FileDelete(@TempDir & '\sof') MsgBox(0, "", $NumberOfFiles & " in " & Round($SizeOfFiles / 1024))
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now