Solved

Cannot delete .lnk file using dos

Posted on 2006-11-21
4
877 Views
Last Modified: 2007-12-19
I have to create a script to delete the outlook xp shortcut in the quick launch toolbar.
Here is what I am using in dos

del c:\documents and settings\5139\application data\microsoft\internet explorer\quick launch\launch microsoft outlook.lnk

I can get to that exact location in dos, but when I type in del .........\launch microsoft outlook.lnk  I get the below error.

Could not find c:\documents and settings\5139\application data\microsoft\internet explorer\quick launch\launch

as you can see, it stops at launch.  any ideas?
0
Comment
Question by:steveLaMi
  • 3
4 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 17987485
del "c:\documents and settings\5139\application data\microsoft\internet explorer\quick launch\launch microsoft outlook.lnk"

should do it
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 17987505
The problem is that there are spaces in the directory names, so it's recognized as a parameter, instead of a folder...
0
 

Author Comment

by:steveLaMi
ID: 17987728
Is there anyway to get around the fact there are spaces? Can I use underscores or ~  ?
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 17987885
You 'could' potentially, but enclosing it in quotes is the best solution.
The way 8.3 filenames transfer, the above 'could' read:

del c:\docume~1\5139\applic~1\microsoft\intern~1\quickl~1\launch~1.lnk

but launch~1.lnk could refer to any number of files - you could be deleting "Launch Outlook Express.lnk" for example....

It depends on how the 8.3 were built:

Launch Outlook Express.lnk  = Launch~1.lnk
Launch Microsoft Outlook.lnk = Launch~2.lnk
Launch Other Program.lnk = Launch~3.lnk

Here's some detail on how they're built: http://home.teleport.com/~brainy/lfn.htm
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question