How to delete a file when:
* Windows says \\\'file access denied\\\'.
* \\\'File in use\\\' error.
* Can\\\'t delete a file (insert cryptic reason).
* Rebooting doesn\\\'t help delete the file.
Despite all its quirks, Windows does do some things for a good reason. Some files need to be locked down when they are in use, otherwise you risk damaging the file or harming the Operating System. Unfortunately Windows XP seems to be plagued by files that cannot be deleted. These are frequently simple files like videos (AVI), MP3s or other seemingly harmless files. You try to delete the file, Windows waits a few seconds before announcing that access is denied, the file is currently in use and cannot be deleted. However, you know it\\\'s not in use and you just want it deleted.
If you have encountered this problem, here is a step-by-step process for trying to purge the files you can\\\'t delete. It starts with the basics for Windows XP and moves on to more involved tricks. The process will work for all recent Windows releases, but Windows XP has been causing the most the problems, so we will focus on it. Please note: we are assuming that the file is not crucial to the operation of Windows - deleting important system files can cause havoc.
1. Is the file in use? It sounds obvious but it happens. If it is being used or open, close the file and the application that opened it. For example, if it is a Word document, close Microsoft Word.
2. If the file was opened in an application (and subsequently closed), but the program is still running, try quitting the program. Windows will lock a file because the application hasn\\\'t yet released it. This is not always Windows fault and can be the fault of the program.
3. If the file is an AVI, in particular a DivX AVI, try renaming it and then deleting it. DivX files don\\\'t get on very well with Windows XP and sometimes renaming the file can trick Windows into releasing it.
4. Reboot your PC and don\\\'t start any programs. Go directly to the file and delete it.
5. In Windows Explorer, switch to View-Details and then select View-Choose Details. Uncheck everything except the file name. This stops Windows XP trying to read the file - this problem affects many video, audio and graphics files.
6. Still no luck? OK, here is the best trick of all. Most sites give you cryptic Windows registry and DOS commands to remove a file, but the answer is so much simpler. Get a copy of MoveOnBoot. It\\\'s free and this simple tool allows you to Move, Copy or Delete files before Windows can lock or alter the files. The changes are made to your hard drive before Windows starts, hence it requires a restart of your system after you give MoveOnBoot its instructions. There are no messy boot or DOS commands, just a simple 3-step process.
Step 1: Locate the name of the file that is causing your problems.
Step 2: Decide if you want to copy, move or delete the file.
Step 3. Choose a destination for moving the file, or a new file name for the rename option (this option won\\\'t appear if you are deleting a file).
Click OK to confirm you want to process. The nice thing is that the program doesn\\\'t make you reboot straight away. It\\\'s a good idea to reboot ASAP, but if you are in the middle of something and want to wait, the program will simply run next time you start Windows.
7. If the file reappears again (check its creation date to ensure it is being recreated) and you can\\\'t make it budge, you may have trouble with spyware or a virus on your system (don\\\'t overlook the possibility it may also be an important system file). In this case you should get a good spyware removal program to scan your system.
How to create your own free CD autorun for HTML and most file types.
Create your own autorun CD or DVD
It is easy to create an autorun CD or DVD for Windows and all it takes are a few files (which we\\\'ve supplied for free). The technique can be used to open other file types, but HTML is used for a reason: it is the most commonly supported by Windows (most PCs have a Web browser) and it is flexible. You could use it to open other files, such as a Powerpoint presentation, but it would require the end user to have Powerpoint or the Powerpoint viewer on their system.
The autorun zip file we\\\'ve prepared contains everything you need to autorun a CD and open a HTML file. So download a copy - it\\\'s tiny and free - see above for the download link.
So why can\\\'t an autorun open a HTML directly? It is because a Windows autorun can only open an application (program) not a data file (eg HTML). You cannot tell an autorun to directly open a HTML file. Try it, and nothing will happen. To get around his problem, we are using a .bat file which Windows will treat as a program. This special file will then open the HTML file.
Assembling the CD
Download and copy the files to your root directory of the CD. These are: autorun.inf, autorun.bat and index.html. You can put all sorts of files on the rest of the CD. They won\\\'t affect the autorun. You can test the autorun by burning the three files to the root directory of a test CD-R. Open the CD drive and close it again. Viola, you have just created your own autorun HTML CD. You should change the contents of index.html to whatever you need. The index.html supplied is only a test page.
Changes you can make
The autorun can open any type of file and display any message you want. To make changes, open Windows Notepad (do not use Word, WordPad or other Word processors). Now open the autorun.bat file from within Notepad. The order is important, if you double-click the autorun.bat file, it will try to run. So open NotePad and select File-Open and choose the autorun.bat file. You\\\'ll see four lines of code.
The first line after @echo (remember the space) will appear as a comment in the autorun launch Window. This comment will be seen very briefly by your end-users. It can be changed to anything you want, but since it only appears for a second or less, don\\\'t make it too wordy. If you wanted to say \\\'The CD is loading now...\\\', the first line of code will look like:
@echo The CD is loading now...
The second line of the code tells the .bat file to open to your index.html file. If want to open a file by another file (eg readme.txt), then it would read:
@start readme.txt
Make sure you leave the last two lines untouched (@cls and @exit) - they must always appear last. Save the changes and you are done. That that\\\'s all you need to create your own HTML autorun CD.