General discussion

Locked

Deleting Temp File Automatic

By sphynx ·
Hello NT expert,
is there anybody know how to automatically delete temp file on Windows NT 4.0.
Thanks..

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Deleting Temp File Automatic

by WanabeDrSean In reply to Deleting Temp File Automa ...

write a script and put it in startup folder

Collapse -

Deleting Temp File Automatic

by sphynx In reply to Deleting Temp File Automa ...

Poster rated this answer

Collapse -

Deleting Temp File Automatic

by tore In reply to Deleting Temp File Automa ...

Hi!

You should write a batchfile and use the command at to schedule it to run when you need it to. If you put it in the startupfolder, it will only run once (when you log on to your server. The at command runs at specific (you decide) times! Justtype at /? for syntax in an cmd window. Hope this helps!

Collapse -

Deleting Temp File Automatic

by sphynx In reply to Deleting Temp File Automa ...

Poster rated this answer

Collapse -

Deleting Temp File Automatic

by mahdeekus In reply to Deleting Temp File Automa ...

Just in case you need something more specific (without wanting to be too patronising):

You can create a batch file containing the following text:

REM Delete Temp Files
cd c:\temp
del *.*
cd c:\winnt\temp
del *.*
exit

Type all of this text into Notepad. Save this file with a .bat file extension to
c:\Winnt\Profiles\All Users\Start Menu\Programs\Startup

if C: is your drive that contains Windows NT. This will only work if you are logged on as administrator or as someone with local administrator rights to the NT 4.0 machine.

You can also insert "/y" if you want the batch file to delete temp files without prompting with the "Are you sure?" message, at the end of each line starting with "del"

Alternatively, you can useNT's autoexec.bat. Type "sysedit" at a run command. Paste the above text into the autoexec.bat file and select "file", "save" and exit.

As stated above, you can use the AT command to schedule this command to run at specific times if you require temp files to be deleted more often that at logon.

Collapse -

Deleting Temp File Automatic

by sphynx In reply to Deleting Temp File Automa ...

Poster rated this answer

Collapse -

Deleting Temp File Automatic

by estebandelatorre In reply to Deleting Temp File Automa ...

Will be enought on every boot???

Make a .bat file like this:

cls
cd\
cd c:\temp
del *.*
cd c:\winnt\temp
del *.*
exit

Name the file winstart.bat and save into the root of your c: drive. Each time the os starts, the program will be launched. (oh, also set it to close on finish!)
It also works under win9X!

Collapse -

Deleting Temp File Automatic

by sphynx In reply to Deleting Temp File Automa ...

Poster rated this answer

Collapse -

Deleting Temp File Automatic

by sphynx In reply to Deleting Temp File Automa ...

This question was closed by the author

Back to Windows Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums