Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting from Recycle Bin
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01110745
Message ID:
01110765
Views:
23
Though I use the parameter name indicating the character, it should work for number too.

>Perhaps unrelevant question, but is parameter of the function numeric or character? You're passing numeric, but the name suggests character.
>
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform