Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 898
  • Last Modified:

Cannot delete .lnk file using dos

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
steveLaMi
Asked:
steveLaMi
  • 3
1 Solution
 
sirbountyCommented:
del "c:\documents and settings\5139\application data\microsoft\internet explorer\quick launch\launch microsoft outlook.lnk"

should do it
0
 
sirbountyCommented:
The problem is that there are spaces in the directory names, so it's recognized as a parameter, instead of a folder...
0
 
steveLaMiAuthor Commented:
Is there anyway to get around the fact there are spaces? Can I use underscores or ~  ?
0
 
sirbountyCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now