Modify

Opened 10 years ago

Closed 4 years ago

#2794 closed Feature Request (Rejected)

FileDelete ability to remove the file stream

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

Description

Simple API can delete :somedata stream
DllCall('kernel32.dll', 'bool', 'DeleteFileW', 'wstr', 'test.txt:somedata')

but FileDelete can`t
FileDelete('test.txt:somedata')

Test code:

FileClose(FileOpen('test.txt:somedata', 1))
FileDelete('test.txt:somedata') ;FALSE
DllCall('kernel32.dll', 'bool', 'DeleteFileW', 'wstr', 'test.txt:somedata') ;OK

Is it bug? or possible to improve the FileDelete?

Attachments (0)

Change History (4)

comment:1 Changed 10 years ago by TicketCleanup

  • Version 3.3.12.0 deleted

Automatic ticket cleanup.

comment:2 Changed 10 years ago by Melba23

Given that it is so simple to do, what is preventing you from writing a simple 2 line wrapper function to do this in your own scripts when needed? Why bloat the core function?

M23

comment:3 Changed 10 years ago by Mat

Melba23,

I think AutoIt is almost certainly calling DeleteFile internally, this is just a change to the definition of a "path" when it comes to deleting files.

Since Jon is looking at the way paths are handled in internal functions at the moment hopefully this is a trivial fix that would make FileDelete a little more versatile.

Though it doesn't even require a custom function as _WinAPI_DeleteFile will already do this.

comment:4 Changed 4 years ago by Jpm

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

Sorry for the late answer,
In fact the internal autoIt code handle wildcard so it involve a lot of internal change
So as _WinAPI_DeleteFile() is OK just use it for Metadata

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

Action
as closed The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.