Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting from Recycle Bin
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01110745
Message ID:
01110941
Vues:
13
Hi Yuri,

I run your code in EXE under WinXPSP2 and it works but displays message box "Are you sure you want to delete ... ?" for each file. Try
*	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
>*------------------------
>
>
>I know, there are other solutions to empty the Recycler. And they work. But I am interested in this particular solution. Thanks in advance.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform