Jump to content

can some1 hel me make a clenaup.cmd?


kurt476

Recommended Posts


it depends on which temp folders you are referring too... if you are talking the user's temp dir, it would be (for XP)

%systemdrive%\Documents and Settings\User\Local Settings\Temp

but generally speaking, that folder should be pretty empty to start off. If you are talking about your specific folders you used during installation of your programs, you could put the following code in your cmd file

RD /S /Q %systemdrive%\setup\applications

just continue on that idea for all the folders you need to delete. Obviously anything contained in the "applications" folder in my example would be deleted

hope that helped

Link to comment
Share on other sites

yeah i'm talking about:

%systemdrive%\Documents and Settings\User\Local Settings\Temp

for XP and i think win2k3 has too how about deleting the *.tmp files to and the junk files is there a program durning the RunOnceEx.cmd to clenup the junk files that i install first then it cleanuse up after the installation applications?

Link to comment
Share on other sites

there's nothing "built in" to runonce that would automatically flush your temp directory that i'm aware of, though to be honest, i don't use runonce, so I'm not 100% sure. I would have to digress to the members that have more knowledge on that than I.

Have you found that the temp directories are filled with files during/after an install?

good luck.

Link to comment
Share on other sites

rd /q /s "%systemdrive%\Documents and Settings\User\Local Settings\Temp\"

That shoud work. If there are any files in that directory that are currently in use, they will not be deleted. Otherwise, the temp directory as well as all files and subfolders will be deleted. That's fine as Windows will recreate the Temp directory at the next logon.

Link to comment
Share on other sites

did you try that literally, or did you change User to the user name you want to delete the temp files of?

i have Administrator, All Users, Default User

only Default User and Administrator have a temp dir

so you might want to try

RD /Q /S "%systemdrive%\Documents and Settings\Administrator\Local Settings\Temp\"
RD /Q /S "%systemdrive%\Documents and Settings\Default User\Local Settings\Temp\"

and that's only if you're using an english xp

Link to comment
Share on other sites

Or your temp dir is an environmental variable.

Such as:

Del /Q /F /S %Temp%\*.*

As others have stated, files may be in use, that may cause prompts. For unattended, if tested, and no prompts, then it should be good to burn.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...