Here's our Windows XP Tip for.. June 2, 2004
Click Here to see a complete list of all of our previously released Tips!
Delete on Start
Are you looking for a way to automatically delete some files when start your computer? For example, you may want to get rid of all of the temporary files in your System's TEMP directory.

One way to accomplish this is to use a batch file. In our example, if you want to delete all the TMP files in your system's temp folder, open Notepad and type:

del c:\data\*.tmp

Now choose File, Save As and give the file a name. You can use any name you want, but you need to use the BAT extension. DelTemp.bat would work.

After you save your new batch file, run Windows Explorer and locate your Startup folder. Now use the right-mouse button to drag the DelTemp.bat icon to the Startup folder. When you release the mouse button, choose Create Shortcut(s) Here from the pop-up menu.

Now open the Startup folder and right-click the new shortcut. When the Properties dialog box opens, click the Shortcut tab. Click the arrow at the right side of the Run list box to expand the list. Select Minimized and click OK. When the appropriate user logs on, the batch file will run, deleting those pesky TMP files.