Hi..
I have create a script to get files form folder
I have make a button to remove a file from listview
how can i do it pleas help me
this is the script ..
#include
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("show file from folder", 453, 340, 192, 124)
$ListView1 = GUICtrlCreateListView("File name|Attribute|Track", 8, 8, 442, 294)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 125)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 150)
$BDeleteFile = GUICtrlCreateButton("Delete file", 328, 304, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;~ -----------------------------------------------
$DIR = "E:aness"
;~ get the file inot array
$FILE = _FileListToArray($DIR,"*")
Func ShowFils()
sleep(500)
For $INDEX = 1 To $FILE[0]
$POINT = StringInStr($FILE[$INDEX],".",0,-1)
;~ if there are an error or searching file end ExitLoop
If @error Then ExitLoop
;~ get the attrib of file
$att = FileGetAttrib($DIR& ""&$FILE[$INDEX])
;~ checking about the attrib of file
$check_att = StringInStr($att,"H")
;~ if stringinstr Returned True
if $check_att <> 0 Then
If $POINT <> 0 Then
;~ adding the hidden to liswiew
GUICtrlCreateListViewItem($FILE[$INDEX] & "|" & "Hidden"&"|"&$DIR&""&$FILE[$INDEX],$ListView1)
EndIf
Else
If $POINT <> 0 Then
;~ adding the view to liswiew
GUICtrlCreateListViewItem($FILE[$INDEX] & "|" & "Not Hidden"&"|"&$DIR&""&$FILE[$INDEX],$ListView1)
EndIf
EndIf
Next
EndFunc
;~ ----------------------------------------------------
ShowFils()
;~ -------------------------------------------------------
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case
$BDeleteFile
;~ what It should to do
EndSwitch
WEnd
this is my example..
thank you