Solved

Cannot delete .lnk file using dos

Posted on 2006-11-21
4
873 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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now