Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Delete file on boot up

Posted on 2005-03-14
7
Medium Priority
?
755 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
6 Comments
 
LVL 58

Assisted Solution

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

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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 58

Expert Comment

by:Pete Long
ID: 13553049
ThanQ
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.

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…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month13 days, 7 hours left to enroll

580 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