AutoHotkey: Check Windows Folder Sizes
- Category: AutoHotkey
 - Hits: 20706
 
So I needed to clear space on a workstation's C drive. There are other programs about and even some built-in to MS Windows that could potentially be used.
This is a quick article on how to write an AutoHotkey program to simply return the folders in the drive and display the size of all the files/folders contained within.
How?
So I'll be putting this program for download from the download section of this website but I don't expect anyone to trust an executable EXE so here's the code of what it's doing which you can copy and paste to an AutoHotkey script:
AHK Countdown Tooltip
- Category: AutoHotkey
 - Hits: 33408
 
- Microsoft Windows 7 Enterprise
 - AutoHotkey (see code for AHK version)
 
What?
Someone suggested an app that counts the days I have left serving my notice. I thought I'd go one better and have it calculate to the nearest second. I call this latest app "byeBU" and this is version 0.4 Beta (unofficial app).
Why?
Something to do...
How?
Autohotkey Count Number of Files/Folders in a Directory
- Category: AutoHotkey
 - Hits: 29866
 
So this is an article to list methods of retrieving the number of files in a folder/directory.
Why?
Why can't we just use a loop and file pattern native to the Autohotkey programming language:
UserFolder:="C:" -- UserFolder := RegExReplace( MyInputField, "\\$") ; gets rid of trailing slash if required -- Method #1 count := 0 Loop, %UserFolder%\*.*, 0, 1 count++ -- note for future use: ; if A_LoopFileAttrib contains H,R,S ; continueThis works fine at home on your local host on a local drive. Try using this over a networked drive and more time will be spent counting the files then the actual processing (or whatever your script is trying to do).
Format Numbers in AutoHotkey with Commas
- Category: AutoHotkey
 - Hits: 20621
 
    	FormatAddCommas(val) {
    		Result:=val
    		StringLen, OutputVar, Result
    		NumLoop := (OutputVar // 3)
    		DNum = 3
    		Loop, % (NumLoop+1)
    		{
    		   StringRight,Digit,Result,%DNum%
    		   StringReplace, Result, Result, %Digit%,`,%Digit%
    		   DNum += 4
    		}
    		StringLen, OutputVar, Result
    		Loop, %OutputVar%
    		{
    			FirstChar:=Substr(Result, 1, 1)
    			IfEqual, FirstChar, `,
    			{
    				Result:=Substr(Result, 2)
    			} else {
    				break
    			}
    		}
    		Return Result
    	}
		
 
	
		
		Fun with DllCall in AutoHotkey
- Category: AutoHotkey
 - Hits: 26763
 
The one to rule them all:
This is a function I pulled from the Autohotkey forums submitted by SKAN which lists all the functions for a specified Dynamic Link Library (DLL) along with an inputbox for convenience:
Mouseover Links in AutoHotkey
- Category: AutoHotkey
 - Hits: 24730
 
How?
Alternative method of displaying Unicode in Autohotkey GUI
- Category: AutoHotkey
 - Hits: 34759
 
msgbox % Chr(24) ; upwards arrow msgbox % Chr(25) ; downwards arrow, unstable
AutoHotkey Format Date and Format Seconds
- Category: AutoHotkey
 - Hits: 23596
 
In it's straightforward form
FormatTime( TimeString, Format )
{
     FormatTime, FormattedTime , TimeString, %Format% 
     return Formattedtime
}
Page 2 of 4
Credit where Credit is Due:
Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.
Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.
Thank you for visiting and, as always, we hope this website was of some use to you!
Kind Regards,
Joel Lipman
www.joellipman.com
Latest Articles
Accreditation
Donate & Support
    If you like my content, and would like to support this sharing site, feel free to donate using a method below:

 
bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4
 
0xb038962F3809b425D661EF5D22294Cf45E02FebF
 
Paypal:

Bitcoin:
bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4
Ethereum:
0xb038962F3809b425D661EF5D22294Cf45E02FebF

