Opened 11 years ago

Closed 10 years ago

#2321 closed Feature Request (Rejected)

FileDelete() does NOT delete ADS files

Reported by: Exit Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


FileDelete() does not delete Alternate Data Streams.
Here a reproducer.


Func _Try($sFilename)
	FileWriteLine($sFilename, "This is a Test")
	$Return = FileDelete($sFilename)
	$Error = @error
	ConsoleWrite(@lf&"Filename: " & $sFilename & @LF  & "Filedelete() $Return: " & $Return & "   @error: " & @error & @LF)
	If $Return+$Error= 0 Then ConsoleWrite("*** Bug *** ==> If $Return=0 (no Success), @error should be 1 " &  @LF )
	$Return = _FileDelete($sFilename)
	$Error = @error
	ConsoleWrite("_Filedelete() $Return: " & $Return & "   @error: " & @error & @LF& @LF)
EndFunc   ;==>_Try

Func _FileDelete($sFile)
	$sFile = DllCall('kernel32.dll', 'int', 'DeleteFileW', 'wstr', $sFile)
	Return SetError(Not $sFile[0], 0, $sFile[0])
EndFunc   ;==>_FileDelete

I would recommend to replace FileDelete function by _FileDelete function in my code.

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by Jon

  • Resolution set to Rejected
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.