* oItem.InvokeVerb("&Delete") ERASE (oItem.Path)>What could be the reason that the code below works if called as prg or exe from VFP command line with DO ... command, but it does not work if called from the Windows by clicking on exe file, or using ShellExec API from VFP command line?
>oShell= CreateObject("Shell.Application") >do iDel_ALL_Contents with 10 && Recycle Bin >oShell=null >RETURN >*-------------------------------------- >Procedure iDel_ALL_Contents >lPArameter lcdir >LOCAL oItem >FOR EACH oItem IN oShell.NameSpace(lcdir).Items > >* the line below does not work if the program called as EXE; >* no errors no messages, and it does not delete the file > > oItem.InvokeVerb("&Delete") > >ENDFOR >WAIT clea >RETURN >*------------------------ >>