Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Simple .Bat file by ME

Legendary Battlemage
Joined
Nov 18, 2006
Messages
640
Reaction score
0
its a simple 2 line bat file that cleans out the windows temporary folder where all the word backups and stuff go so it potentally over time CAN increase win 2000 and XP's speed
its not much only 2 lines of code!
oh yea only run this at startup if it is run at shut down things may go wrong on XP and 2000
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Mar 12, 2006
Messages
47
Reaction score
0
this is a potentially dangerous file, and also pointless.

Its dangerous because it removes the temporary directory, then recreates it. But what if something is using it at the time? Permission denied on the delete you would think, but what if something tries to use it at the point between its deletion and its creation?

The safe way of cleaning temporary files is to use the "disk cleanup" tool on the drive.

It's pointless because a) it doesn't speed anything up, it just saves disk space and b) there are better ways of doing this.

at the very least if you want to use this you should use del /s /q %temp%/* instead of deleting the entire directory, but really you should use the methods already provided. There are probably also tools that come with windows to decrease the temporary directory's maximum size or the expiry time that files stay in there, which would be much better.

If you are going to post a batch file, it should at least be useful. For eample the following will pull all the custom gif emoticons that are used in msn/windows live messenger etc on all messenger accounts and place them in the root msn data directory.
Code:
cd %appdata%\Microsoft\MSN Messenger
findstr /S /M "GIF*" *.dat | find "CustomEmoticons">allGifs.txt
for /F "tokens=1" %%i in (allGifs.txt) do copy /Y %%i %%i.gif
del allGifs.txt
This is messy because you can't use the | pipe inside the for command so it has to create a temporary file, which adds 2 lines to the batch file, but you should get the idea of what a useful and relatively powerful batch file may be.
 
Legendary Battlemage
Joined
Nov 18, 2006
Messages
640
Reaction score
0
ahh but if you run it ONLY at start up it isnt dangerous i forgot to add that to my post!
it clears the directory only it dosent remove it.
 
Divine Celestial
Loyal Member
Joined
Jul 7, 2004
Messages
853
Reaction score
5
sage

Go clean the tempdir out yourself... don't need to waste another cluster of storage for this.

One more thing, does it make more sense to post a 264 bytes zipped file or a 28 bytes batch file?
 
Legendary Battlemage
Joined
Nov 18, 2006
Messages
640
Reaction score
0
Re: sage

Go clean the tempdir out yourself... don't need to waste another cluster of storage for this.

One more thing, does it make more sense to post a 264 bytes zipped file or a 28 bytes batch file?
the forum dosent allow uploading of .bat files only zip rar and image files
 
Custom Title Activated
Loyal Member
Joined
Aug 8, 2004
Messages
3,892
Reaction score
20
Enough with the negative comments people. Remember, constructive criticism only here!

And yes, if I want to clean out my temp dir I usually just run windows disk cleanup, tends to be a bit more thorough :wink:
 
All is well...
Loyal Member
Joined
Feb 22, 2006
Messages
1,520
Reaction score
0
Yah he makes some of us feel better about ourselves...
It was a good idea but not very useful in the end
 
Legendary Battlemage
Joined
Nov 18, 2006
Messages
640
Reaction score
0
i guess so oh well i use it when i need a quck temp clean up and if i cant wait 5 min to diskclean up to finish
 
Divine Celestial
Loyal Member
Joined
Jul 7, 2004
Messages
853
Reaction score
5
sage

the forum dosent allow uploading of .bat files only zip rar and image files
then rename it to an allowed extension? Renaming is easier than compressing (actually expanding) and then uploading amirite?
 
Legendary Battlemage
Joined
Nov 18, 2006
Messages
640
Reaction score
0
Re: sage

then rename it to an allowed extension? Renaming is easier than compressing (actually expanding) and then uploading amirite?

your right but theese are the allwed extensions
bmp doc gif jpe jpeg jpg pdf png psd rar txt zip
i guess ill put it ina txt file next time
 
<3
Banned
Joined
Jul 18, 2005
Messages
863
Reaction score
14
Re: sage

your right but theese are the allwed extensions
bmp doc gif jpe jpeg jpg pdf png psd rar txt zip
i guess ill put it ina txt file next time

what she means is rename the file extension such as

bat.bat -> bat.txt

then just rename it to batch.bat again

pz.
 
Custom Title Activated
Loyal Member
Joined
Aug 8, 2004
Messages
3,892
Reaction score
20
Mmpf, unzipping means doubleclicking, renaming means right-clicking and entering a new extension so I prefer a zip anyway :tongue:

Though if you ask me a simple \[code\] tag would've worked :wink:
 
Custom Title Activated
Loyal Member
Joined
Aug 8, 2004
Messages
3,892
Reaction score
20
Re: sage

You mean [code][/code] tags? :wink:

Yeah those.. I'm used to a different forum where you can just escape brackets like you would in a normal language :eh:
 
Back
Top