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.
Batch To Delete Shortcut on Desktop
Moderator: DosItHelp
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Batch To Delete Shortcut on Desktop
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
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.
Also not sure if shortcut extensions are different but I am able to see all file extensions except for shortcuts which is kinda weird.