ayu_2403 Posted June 28, 2023 Posted June 28, 2023 Local $oShell = ObjCreate("shell.application") Local $oFolder = $oShell.Namespace($sFolderPath) $oFolder.ParseName($sItemName).InvokeVerb("delete") This code deletes the file, but does not do it permanently.Is there a way to modify this code so that it does it permanently.
Developers Jos Posted June 28, 2023 Developers Posted June 28, 2023 Filedelete() ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
ayu_2403 Posted June 30, 2023 Author Posted June 30, 2023 On 6/28/2023 at 5:29 PM, Jos said: Filedelete() ? I know it about FileDelete @Jos 😀 ...but in my case i have to use the native delete method of windows.
spudw2k Posted July 3, 2023 Posted July 3, 2023 (edited) Not sure why FileDelete doesn't suffice, but there is also a function in the WinAPI UDF you could look at in the Help File. _WinAPI_DeleteFile() That's about as native as you can get.https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_DeleteFile.htm If you really want or have to use a COM object to delete a file, you may be better suited to use Scripting.FileSystemObject. Edited July 4, 2023 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now