We cannot help you to write a script as you do not have enough experience, and it is a more complicated issue than you think it is.
Here is a script which will do the job:
Code:
Break ON
$gDiscard=SetOption("Explicit","ON")
Dim $sStartDir,$sRoutine
$sStartDir="C:\temp"
$sRoutine="udfDeleteZeroLengthFile($$sEntry)"
udfEnumDir($sStartDir,$sRoutine)
Function udfEnumDir($sDir,$sCall)
Dim $sEntry,$sDiscard
$sEntry=Dir($sDir)
While Not @ERROR
If Not($sEntry="." OR $sEntry="..")
$sEntry=$sDir+"\"+$sEntry
If GetFileAttr($sEntry) & 16 udfEnumDir($sEntry,$sCall) EndIf
$sDiscard=Execute($sCall)
EndIf
$sEntry=Dir()
Loop
EndFunction
Function udfDeleteZeroLengthFile($sPath)
If Not (16 & GetFileAttr($sPath))
If GetFileSize($sPath)=0
If @ERROR=0
"File "+$sPath+" is zero length - deleting..." ?
Del $sPath
If @ERROR "Error deleting file: "+@ERROR+", "+@SERROR ? EndIf
EndIf
EndIf
EndIf
EndFunction
Change the variable "$sStartDir" to match the directory that you want to purge, and run the script to delete zero length files.
I strongly suggest that you backup the file store before you begin the delete.