Solved

Login script

Posted on 2006-07-03
1
191 Views
Last Modified: 2010-04-17
I would like to send add the following to a bat script but it doesn't work

del C:\Documents and Settings\%username%\desktop\epf.lnk
0
Comment
Question by:cogit
1 Comment
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 17032579
For one thing you've got to have quotes around the path if it's got spaces in it.  It also might be easier to use the %userprofile% variable instead of C:\Documents and Settings\%username%.  I'd write the command like this instead:

if exist "%userprofile%\desktop\epf.lnk" del "%userprofile%\desktop\epf.lnk"
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
This is an explanation of a simple data model to help parse a JSON feed

830 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