Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delete Items to My Network Places

Status
Not open for further replies.

celia1

MIS
Nov 25, 2002
20
FR
Hy,

i want to delete all items in c:\documents and settings\%userprofile\My network places.

I tried to do:
fso.DeleteFile *.lnk -> no result
del *.* -> no result

please help me.
Thanks
 
Hello celia1,

Don't have what you mean by your command lines. Are they just pseudo-code?... Try this see what give.
Code:
suserprofile=createobject("wscript.shell").expandenvironmentstrings("%userprofile%")
spath="c:\documents and settings\" & suserprofile & "\mynetwork places"

set fso=createobject("scripting.filesystemobject")
fso.deletefile spath & "\*.lnk", true
set fso=nothing
regards - tsuji
 
Thanks but i apply your script but in my case it doesn't function because these links are special!!!
 
celia1,

I really don't know what "special" really "special" about... But, I had a typos slipped in there. Hope that is not the cause. (I rely on your good scripting sense on all the name of the folders in the path.)
[tt]
spath="c:\documents and settings\" & suserprofile & "\my[COLOR=red yellow] [/color]network places"
[/tt]
- tsuji
 
Further notes:

I followed your path suggestion. But if this is real problem, I want to know exactly what %userprofile% is. What does it look like in your case? You must have the right path. Echo out the spath:
[tt] wscript.echo suserprofile[/tt]
to inspect what is it.

- tsuji
 
celia said:
these links are special
"My network places" ("Voisinage réseau" subset of "Favoris réseau") is a folder of folders (at least in winXP)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hello PHV,

Member celia1 elected to open a new thread saying url link:
and elected not to clarify here. Maybe that's what "special" all about. No way to know. It's kind of a curious way to treat the forum.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top