Sign in to follow this  
Followers 0
nisa

Archive Counter

1 post in this topic

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))

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0