﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
917	Funciton FileRecycleEmpty() hangs	roman.kuechler@…		"Hi

I use AutoIt since many years. The last days i had a strange behaviour of the function FileRecycleEmpty():

We use some AutoIt-Script from me of about 600 servers. On one (really only one!) server, my script stopped execution and hung (process still open) every time on the same line:


{{{
$RecycleDEmpty = FileRecycleEmpty(""D:\"")
}}}

Even if i tryed to time out the function, the script hung:


{{{
$RecycleDEmpty = 0
$TimerBegin = TimerInit()
While $RecycleDEmpty <> 1 And TimerDiff($TimerBegin) < 30000
	$RecycleDEmpty = FileRecycleEmpty(""D:\"")
	Sleep(1000)
WEnd
If $RecycleDEmpty = 1 Then
	FileWriteLine($AutoImagelog, @MDAY & ""."" & @MON & ""."" & @YEAR & @TAB & @HOUR & "":"" & @MIN & "":"" & @SEC & @TAB & ""Recycler of D: emptied successfully."")
ElseIf $RecycleDEmpty = 0 Then
	FileWriteLine($AutoImagelog, @MDAY & ""."" & @MON & ""."" & @YEAR & @TAB & @HOUR & "":"" & @MIN & "":"" & @SEC & @TAB & ""Recycler of D: could not be emptied."")
EndIf	
}}}

I tryed many things, e.g. a ""chkdsk /f"" on this drive, without success. Until i deleted(!) the (system-)directoy ""RECYCLER"" on drive D: manually on that server. Windows generated immediately a new directory ""RECYCLER"" and from then on the script worked.

Unfortunately, i can't show the output from the _DebugBugReportEnv() function because it's the first time i report a bug. Very sorry.

But something was wrong with the Recycle Bin on this drive D: and AutoIt couldn't handle this.

Kind regards,
Roman."	Bug	closed		AutoIt	3.3.0.0	None	Works For Me	FileRecycleEmpty() hangs	
