troubleshooting Question

What script syntax to delete a file from all of the \\Documents and Settings desktops?

Avatar of yuhs
yuhs asked on
Windows BatchWindows XP
3 Comments1 Solution272 ViewsLast Modified:
VERY simple script, but I can't figure it out.

I want to deploy a script to my building to delete a particular icon from all the user desktops (XP machines). The icon I want to delete is not in the "All Users" profile, but is saved in individual user profiles. This script below works when I use it to delete the icon from the All Users, Default User, or my own desktop. But how do I script it to delete the icon from all the unknown profiles on the PC ?

This works:    del icon.url "\\%PC%\C$\Documents and Settings\all users\Desktop"
This doesn't:  del icon.url "\\%PC%\C$\Documents and Settings\%users%\Desktop"

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros