Search code examples
javascriptwindows-desktop-gadgets

How to delete a file using Windows Sidebar Gadget API?


I know that Windows Sidebar Gadget API provides functionality beyond normal Javascript capabilities. Does it manipulate files? How?

I didn't find how to do it in the API Reference


Solution

  • Use System.Shell.RecycleBin.deleteItem method.

    retVal = System.Shell.RecycleBin.deleteItem(
      strItemToDelete
    )