?
Solved

Delete file on boot up

Posted on 2005-03-14
7
Medium Priority
?
750 Views
Last Modified: 2008-01-09
Is there a way to get Win XP to delete a file on boot up? In the older versions I could add "del c:\Documents and Settings\cjsa\Desktop\access.log" to the autoexec.bat file and it would delete the file before I got into the desktop & the file was in use.

I tried adding that line to the autoexec.nt file but it ignores it.

The access.log file is created by my abyss webserver and is in use as soon as windows enters the desktop, what I want is every time I restart the system it deletes the file & then when it gets to the desktop the Abyss server will create it again.
0
Comment
Question by:cjsasl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 57

Assisted Solution

by:Pete Long
Pete Long earned 500 total points
ID: 13534886
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 13534894
or sctipt the use of "KillBox" on the file
http://www.broadbandmedic.com/download/VbStuff/TheKillBox.zip
0
 
LVL 6

Expert Comment

by:mslunecka
ID: 13535472
If you don't actually want to delete it every time you reboot, you could always just disable the appropriate services, reboot the server and then the file shouldn't be locked.  You may not even need to reboot the server, sometimes stopping the service is enough.  You would then be able to archive your logs, which I have always believed is preferable to simply deleting them.  You might want the info some day.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Accepted Solution

by:
Eagle6990 earned 700 total points
ID: 13536813
You could also take the command you already use and create your own batch file such as cleanup.bat and store it somewhere on your computer.  Then go to Start>Run>Gpedit.msc to modify your local group policy.  Go under Computer Configuration>Windows Settings>Scripts>Startup script and add your batch file here.  Every time you start your computer it will run the batch file like Autoexec.bat did.  Your computer will be running when it runs but no user will be logged in.  It may or may not work in your case.
0
 

Author Comment

by:cjsasl
ID: 13539311
Thanks everyone for your replies.

Shoot, I wanted to give Eagle6990 1/2 credit for the solution here.
Is there anyway I can do this now?

eric
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 13553049
ThanQ
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

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…
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

801 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