Re: help with cleaning for files?

"valery_vi" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
Yes,

FileDelete($clean_path&"\*")
or
FileDelete($clean_path&"\*.*")

doesn't working.

There is other solution to delete files of Temp folder:

$clean_path=@UserProfileDir&"\local settings\temp"
$search = FileFindFirstFile($clean_path&"\*.*") 
If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search 
pattern")
    Exit
EndIf
While 1
 ;FileFindNextFile returns filename without Path!
 $file = FileFindNextFile($search) 
 If @error Then ExitLoop
  ;Get attribute
  $attrib = FileGetAttrib ($clean_path & '\' & $file)
  ;Test only files but not folder!
  If Not StringInStr($attrib, "D") then 
    MsgBox(4096, 'File tested', 'File path:' & @CrLf & $clean_path 
& '\' & $file)
    ; Uncomment next line to delete this file
    ;FileDelete($clean_path & '\' & $file)
  endif
WEnd
FileClose($search)

Try it and after then uncomment line with FileDelete.

Valery

--- In [email protected], "Littlefield, Tyler" 
<compgeek13@...> wrote:
>
> Hello,
> I'm doing somethin glike:
> $clean_path=@UserProfileDir&"\local settings\temp"
> FileDelete($clean_path&"\*")
> not working.
> any ideas?
> Thanks,
> ~~TheCreator~~
> [My programs don't have bugs; just randomly added features]
> msn:
> compgeek13@...
> aim: st8amnd2005
> skype: st8amnd127
> vertigo head coder
> web: tysdomain.com
> 
> [Non-text portions of this message have been removed]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.