Page 1 of 1
Batch To Delete Shortcut on Desktop
Posted: 31 Oct 2022 18:40
by data808
I run this batch file and it says it can't find it:
@echo off
del "%userprofile%\desktop\TEST"
pause
The shortcut is called TEST on the desktop but this batch file says it can't find it. Am I missing something?
Thanks.
Re: Batch To Delete Shortcut on Desktop
Posted: 31 Oct 2022 19:15
by ShadowThief
If it's a shortcut, it almost certainly has the .lnk extension (that's a lowercase L, not a capital i) and you have extensions turned off so you can't see it.
Re: Batch To Delete Shortcut on Desktop
Posted: 01 Nov 2022 20:04
by data808
I figured there was an extension that I couldn't see and I thought it was .ink not .lnk. So I did run it both with and without .ink but it didn't work. I just tried .lnk and it worked. Thanks for clarifying that.
Also not sure if shortcut extensions are different but I am able to see all file extensions except for shortcuts which is kinda weird.