Feed to listbox...

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I SubDir Branch Viewed Program Files X86, copied the full paths to clip. Pasted them into a text editor. Made 8 typos in the file. Saved as UTF-LE with signature. Used AHK_L.

System Security, Microsoft Security Essentials (MSE), Win7 x64
AutoHotkey Script, ___FileExistTest___.ahk

Code: Select all

#NoEnv
StartTime:=A_TickCount
failed:=0
Loop, Read, c:\Users\CrASh\Documents\Program Files (x86).txt
{
	total:=A_Index
	if(!FileExist(A_LoopReadLine) && failed+=1)
		msgNE.=A_LoopReadLine "`n"
}
EndTime:=A_TickCount - StartTime
MsgBox, % "Total Files checked: " total "`n`nTime Elapsed: " (EndTime / 1000) " seconds"
if( msgNE )
	MsgBox, These %failed% Files do NOT Exist:`n`n%msgNE%
MsgBox #1: wrote:---------------------------
___FileExistTest___.ahk
---------------------------
Total Files checked: 17698

Time Elapsed: 4.118000 seconds
---------------------------
OK
---------------------------
MsgBox #2: wrote:---------------------------
___FileExistTest___.ahk
---------------------------
These 8 Files do NOT Exist:

c:\Program Files (x86)\AutoHotkey\Scripts\!!GU I-Button-Test0.ahk
c:\Program Files (x86)\Opera\styles\images\bullet.pn g
c:\Program Files (x86)\AutoHotkey\Scrip ts\zTest+\zTests_09xx-2010\z_EMEditor\eeUseIni.ini
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\VWDExpress\ProjectTemplat esCache\Web\CSharp\1033\DynamicDataEntityFrameworkWebSite.cs.zip\DynamicData\FieldTemplates\Integer_Edit.ascx.cs
c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\ja\Mscorlib.Resources.d2ll
c:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\uk\System.Windows.Controls.Resources.d2ll
c:\Program Files (x86)\TotalCMD\Data\PLUGINS\wdx\regexp\TEMP\X5-328162000T0012366 006195372.RAW
c:\Program Files (x86)\§WebHTML\Codelobster Software\Codelo bsterPHPEdition\Plugins\YiiData\yii_head.jpg

---------------------------
OK
---------------------------
AHK Help Doc's, on FileExist()
FileExist(FilePattern): Returns a blank value (empty string) if FilePattern does not exist (FilePattern is assumed to be in A_WorkingDir if an absolute path isn't specified). Otherwise, it returns the attribute string (a subset of "RASHNDOCT") of the first matching file or folder. If the file has no attributes (rare), "X" is returned.
...
User avatar
HolgerK
Power Member
Power Member
Posts: 5409
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

MsgBox #1 wrote:---------------------------
test.ahk
---------------------------
Total Files checked: 44047

Time Elapsed: 29.078000 seconds
---------------------------
OK
---------------------------
Okay it's Vista :lol:

Regards
Holger
Channing
Junior Member
Junior Member
Posts: 4
Joined: 2011-07-18, 10:55 UTC

Post by *Channing »

Be careful all these APIs have very terrible support for UNC paths. Most of them will hang a few seconds for an invalid UNC path (e.g. server off-line).
Post Reply