Batch file to remove Windows 10 system shortcuts

1123745 pts.
Tags:
Batch file
Windows 10
I'm trying to use a batch file to remove a bunch of system shortcuts (This includes the Recycle Bin and This PC). But I'm not having any luck at all. This is on Windows 10. Is it just not possible at all? Thank you.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Subhendu code should get the job done. If you are trying it on your own, post your .BAT program and we let you know how to fix it. A word of caution is when running your custom programs like this there may be no recovery if it’s wrong.. You may delete a lot more than you plan on. Why do you want to delete the shortcuts in the first place? They take practically no room and most likely are on the desktop only. You could always group them then do a batch select and delete. It is a safer way. 

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Subhendu Sen

    Assuming you asked for Desktop shortcuts. Generally these shortcuts are under your Users folder. Try this one if this can help,

    open a notepad and write like,  

    @echo off

    Set abc="C:\Users\yourusername\Desktop"

    Set xyz="C:\Users\Public\Desktop"

    del /s /q /f %abc%\*.lnk

    del /s /q /f %xyzt%\*.lnk      (be careful about the file extension)
    Please replace your username with your original user name account which you use for Log in on windows. Now save the file as .bat extension with a suitable name. Open command prompt/ CMD and run the .bat file. Hope this can help you. But it is not recommended. It is better to delete one by one for safe computing.

    130,380 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: