lenoza
asked on
Remove Desktop shortcut with bat file
I use a bat file to place url shorcuts on workstation desktops. i need to remove them from some workstations can i do this with a bat file? here is what i put them out ther with.
xcopy "\\share\ie\CMHC FAQ.url" "%allusersprofile%\desktop \" /d /y
xcopy "\\share\ie\CMHC-SharePoin t.url" "%allusersprofile%\desktop \" /d /y
xcopy "\\share\ie\EMR-SharePoint .url" "%allusersprofile%\desktop \" /d /y
xcopy "\\share\ie\EMR Helpdesk.url" "%allusersprofile%\desktop \" /d /y
xcopy "\\share\ie\Lock Workstation.lnk" "%allusersprofile%\desktop \" /d /y
i tried the del and erase but no luck.
thanks,
Le0
xcopy "\\share\ie\CMHC FAQ.url" "%allusersprofile%\desktop
xcopy "\\share\ie\CMHC-SharePoin
xcopy "\\share\ie\EMR-SharePoint
xcopy "\\share\ie\EMR Helpdesk.url" "%allusersprofile%\desktop
xcopy "\\share\ie\Lock Workstation.lnk" "%allusersprofile%\desktop
i tried the del and erase but no luck.
thanks,
Le0
what is the exact command you executed?
anyway try this:
del %allusersprofile%\desktop\ "CMHC FAQ.url"
del %allusersprofile%\desktop\ "CMHC-Shar ePoint.url "
del %allusersprofile%\desktop\ "EMR-Share Point.url"
del %allusersprofile%\desktop\ "EMR Helpdesk.url"
del %allusersprofile%\desktop\ "Lock Workstation.lnk"
anyway try this:
del %allusersprofile%\desktop\
del %allusersprofile%\desktop\
del %allusersprofile%\desktop\
del %allusersprofile%\desktop\
del %allusersprofile%\desktop\
ASKER
The error I recieve is:
The system cannont find the file specified.
I tried the above syntax with no success. Any suggestions, I am upping the point value because this will save me a ton of hands on works.
Le0
The system cannont find the file specified.
I tried the above syntax with no success. Any suggestions, I am upping the point value because this will save me a ton of hands on works.
Le0
How about this? (note the position of the double quotes)
del "%allusersprofile%\desktop \CMHC FAQ.url"
del "%allusersprofile%\desktop \CMHC-Shar ePoint.url "
del "%allusersprofile%\desktop \EMR-Share Point.url"
del "%allusersprofile%\desktop \EMR Helpdesk.url"
del "%allusersprofile%\desktop \Lock Workstation.lnk"
del "%allusersprofile%\desktop
del "%allusersprofile%\desktop
del "%allusersprofile%\desktop
del "%allusersprofile%\desktop
del "%allusersprofile%\desktop
Are you sure they are URLs? Most shortcuts are .lnk files, maybe try that?
Hmm....just noticed that the last one WAS an .lnk...guess that's not it. Sorry.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Alex you duh man
* files read-only?
* does copying process have rights to delete?
* not found?