ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: monitor folder for max MB and get message

<< < (2/3) > >>

Candle:
Thank you for the help. I guess if it gives the gen size of the folder that would be close.
Most of the files would be zip or rar files .

chedabob:
What Im trying to do is find out where that value is coming from. If its just a simple matter of me expecting it in KB that are 1024 bytes, and its reading them out as 1000bytes in a KB, then Ill just modify the output. Ill do a bit mroe tommorrow.

Do you have any folders within your download folder? Or just files?

Candle:
Yes I guess they maybe a few of what I have open and look at but would just care about the zip, rar and exe files that are there.
Thanks for the help with this.

CodeTRUCKER:
I'm looking forward to this too!

skrommel:
 :) This should do it.

To compile it, download AutoHotkey.

Skrommel



--- ---;FolderLimit.ahk
;  Shows a message when a folder is bigger than a limit
;Skrommel @2007

folder=C:\Test   ;Folder to count and recurse
limit=4000       ;MBs to watch for
pause=10         ;Seconds to wait beween checks
exit=1           ;1=Exit when limit reached  0=Don't

#NoEnv
#Persistent

1mb:=1024*1024   ;Size of 1MB in Bytes
limit:=limit*1mb

Loop
{
  size=0
  Loop,%folder%\*.*,1,1
    size+=%A_LoopFileSize%
  If size>=%limit%
  {
    MsgBox,% folder . " = " . Floor(size/1mb) . "MB > " . Floor(limit/1mb) . " MB!"
    If exit=1
      ExitApp
  }
  Sleep,% pause*1000
}

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version