Thanks
Dom Ciccotto
"Dom Ciccotto" <DomCi...@aol.com> wrote in message
news:44%59.159872$yc3.6...@bin4.nnrp.aus1.giganews.com...
Set oShellApp= WScript.CreateObject("Shell.Application")
Set oRecycleBin= oShellApp.Namespace(15)
oRecycleBin.InvokeVerb "Empty Recycle &Bin"
(I got this from a MVP post here, but I can't recall who. Sorry for bad
crediting.)
Regards,
Joe Earnest
"Dom Ciccotto" <DomCi...@aol.com> wrote in message
news:44%59.159872$yc3.6...@bin4.nnrp.aus1.giganews.com...
"Joe Earnest" <joeea...@qwest.net> wrote in message
news:#vd0wpuQCHA.2632@tkmsftngp10...
"guy" <g...@hotmail.com> wrote in message
news:3h8jlu0fj69djr1tt...@4ax.com...
Recycled >>>Recycler
Change Invoke verb"" right click on c:\recycled
in a English OS may be "&Empty..???"
Const ssfDRIVES = &H11
Set oSH = CreateObject("Shell.Application")
'oSH.NameSpace(ssfDRIVES).ParseName("C:\RECYCLED").InvokeVerb "Open"
oSH.NameSpace(ssfDRIVES).ParseName("C:\RECYCLED").InvokeVerb "S&vuota cestino"
--
Fosco
'Empty Recycle Bin if it has anything in it.
Const ssfDESKTOP = 0
For Each oShFolderItem In oShFolder.Items
If oShFolderItem.Name = "Recycle Bin" Then
oShFolderItem.InvokeVerb("Empty Recycle &Bin")
Exit For
End If
Next
Jerry
"Fosco" <fa...@fake.it> wrote in message
news:NXl69.64461$lu5.1...@twister1.libero.it...
--
Todd Vargo (body of message must contain my name to reply by email)
"Jerry" <je...@hotmail.com> wrote in message
news:qEC69.285199$q53.9...@twister.austin.rr.com...
--
Todd Vargo (body of message must contain my name to reply by email)
"arvaco" <lo...@that.com> wrote in message
news:Ofwau9yQCHA.4284@tkmsftngp09...
Moreover, the name of "Recycle Bin" can be changed and be different on the
desktop. I found a version that relied on class:
------------------------------------------------------------------------
Set oShell = CreateObject("Shell.Application")
Const CLSID = "::{645FF040-5081-101B-9F08-00AA002F954E}"
Set Folder = oShell.Namespace(0).ParseName(CLSID)
Folder.InvokeVerb "Empty Recycle &Bin"
------------------------------------------------------------------------
--
Gurgen Alaverdian
http://www.gurgensvbstuff.com
"Todd Vargo" <todd...@nccw.net> wrote in message
news:edysewWRCHA.1756@tkmsftngp11...
Dim filesys
Dim wshShell
Dim NewFolder
Dim RegKey
Dim ScreenSaver
Dim Result
Set filesys = CreateObject("Scripting.FileSystemObject")
Set wshShell = wscript.Createobject("wscript.shell")
Set WshShell = CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set Shell = CreateObject("WScript.Shell")
Set objShell = WScript.CreateObject("WScript.Shell")
Set oShell = CreateObject("Shell.Application")
Set oShFolder = oShell.Namespace(ssfDESKTOP)
Const ssfDESKTOP = 0
For Each oShFolderItem In oShFolder.Items
If oShFolderItem.Name = "Recycle Bin" Then
oShFolderItem.InvokeVerb("Empty Recycle &Bin")
Exit For
End If
Next
set filesys = Nothing
set wshshell = Nothing
set WshNetwork = Nothing
set NewFolder = Nothing
set objShell = Nothing
Set oShell = Nothing
Set oShFolder = Nothing
"Gurgen" <gur...@bellatlantic.net> wrote in message
news:Ukf79.2462$l62....@nwrddc02.gnilink.net...
YES...
But the most interesting part of all this thread is:
WScript.Echo("Recycle has these verbs " &FolderItemVerb.Name)
It fails also on Win98....
--
Fosco
What version of shell32.dll?
locate shell32.dll on the path, system32 folder for me
look at the version properties
--
Gurgen Alaverdian
http://www.gurgensvbstuff.com
"guy" <g...@hotmail.com> wrote in message
news:ommslusvtpov2fm3o...@4ax.com...
"the rest of it", hmmm. ;-)
>
>
> Set filesys = CreateObject("Scripting.FileSystemObject")
> Set wshShell = wscript.Createobject("wscript.shell")
> Set WshShell = CreateObject("WScript.Shell")
What's the difference between the two WshShell lines above? Do they actually
set WshShell with different objects? I assume they are both the same, but
figured I better ask to be sure.
> Set WshNetwork = WScript.CreateObject("WScript.Network")
> Set Shell = CreateObject("WScript.Shell")
> Set objShell = WScript.CreateObject("WScript.Shell")
> Set oShell = CreateObject("Shell.Application")
> Set oShFolder = oShell.Namespace(ssfDESKTOP)
Why do you need to create so many WScript.Shell objects? I assume it's for
pasting other peoples unmodified code into yours, but one never knows.
>
>
> Const ssfDESKTOP = 0
> For Each oShFolderItem In oShFolder.Items
> If oShFolderItem.Name = "Recycle Bin" Then
> oShFolderItem.InvokeVerb("Empty Recycle &Bin")
> Exit For
> End If
> Next
How does this code help me understand why "_Verb.Name" is failing?
Exactly! I'm using Win98/IE6 and the problem code specifically is
"FolderItemVerb.Name". As I mentioned, ".InvokeVerb" works fine, but I
wanted to expose all available actions for examination.
Well, from reading Michael Harris' post from 1999, I deduce that this is a
bug, but has it ever been fixed? Considering I've upgraded IE/WSH twice
since 1999, I guess not.
"Todd Vargo" <todd...@nccw.net> wrote in message
news:Obq65piRCHA.2684@tkmsftngp08...
It *has* been fixed in OS versions with newer versions of shell32.dll. Upgrading IE and/or WSH on Win98 doesn't upgrade shell32.dll, only an OS upgrade to Win2000/WinXP will solve your problem.
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--
Michael,
That was what I needed to know, thanks.
Well, I checked and sure enough, there was a patch that updated shell32.dll
to version 4.72.3812.600, but it did not address this problem.
Well, since Win98 is supposedly to still be supported, and this was reported
back in 1999, this trivial bug should have been fixed for Win98 long ago.
Stuff like this makes one wonder what other non-security related bug reports
are being ignored for "supported" software. :(
Q. What do call an upgrade from one lemon to another.
A. A sour refreshment. :-D
The object properly invokes "Name" property and executes "Dolt" on Win9x
and WinNT.
Converted example is shown:
--------------------------------------------------------
Const myDesktop = 0
Set oShellApp = WScript.CreateObject("Shell.Application")
'Create a patch object
Set oVerb = CreateObject("ShellPatch.VerbPatch")
Set oDesktop = oShellApp.Namespace(myDesktop)
WScript.Echo("Listing of Folders on my Desktop")
For Each FolderItem In oDesktop.Items
WScript.Echo(FolderItem.Name)
If FolderItem.Name = "Recycle Bin" Then
set FolderItemVerbs = FolderItem.Verbs
For Each FolderItemVerb In FolderItemVerbs
'Get verb Name
vName = oVerb.VerbName(FolderItemVerb)
Wscript.Echo vName
If vName = "Empty Recycle &Bin" then
'Invoke verb
oVerb.VerbDolt FolderItemVerb
End If
Next
End if
'FolderItem.InvokeVerb "Empty Recycle &Bin"
Next
-------------------------------------------------------------
--
Gurgen Alaverdian
http://www.gurgensvbstuff.com
"Todd Vargo" <todd...@nccw.net> wrote in message
news:ect0V0lRCHA.1672@tkmsftngp12...
> Any diagnostics reported with the failure?
Object doesn't support this property or method:'FolderItemVerb.Name'
> What version of shell32.dll?
4.72.3612.1700
( I just read ... bugs with this version)
--
Fosco
YES it works ..
--
Fosco