Tech ARP Forums

Go Back   Tech ARP Forums > Software Discussion > General Software
Register
FAQ Members List Calendar Arcade Mark Forums Read

Google Web www.techarp.com forums.techarp.com

General Software This is the forum for general discussions about software.

Reply
 
LinkBack Thread Tools
Old 22nd Feb 2006, 02:40 PM   #1 (permalink)
Black Sheep
 
Jeremy's Avatar
 
Join Date: 7 Oct 2002
Posts: 2,296
Reputation: 729
Jeremy is a splendid one to beholdJeremy is a splendid one to beholdJeremy is a splendid one to beholdJeremy is a splendid one to beholdJeremy is a splendid one to beholdJeremy is a splendid one to beholdJeremy is a splendid one to behold
Rep Power: 16
Default Batch Automation

Recently, a few forummers here was kind enough to pass me their batch files and among the batch files was one that's used to clear the temp folder. However in Windows XP there's another temp folder located in your profile settings and when I added the following lines to the batch files, nothing seems to happen to it, so what gives?

del c:\windows\temp\*.* /Q
del C:\Documents and Settings\Jeremy Tan\Local Settings\Temp\*.* /Q
__________________
Jeremy Tan (Contributor)
http://www.techarp.com/
Jeremy is offline   Reply With Quote
SPONSOR

Old 22nd Feb 2006, 03:17 PM   #2 (permalink)
ARP Webmaster
 
peaz's Avatar
 
Join Date: 13 Oct 2002
Location: http://atpeaz.placidthoughts.com/
Posts: 8,501
Reputation: 1633
peaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant future
Rep Power: 31
Default

The easiest way to know where to clear the files is to use the environment variables since that's also where Windows get the temp folders location.
There's two folders and their environment variable name is TMP and TEMP
(Note: myself, i always redefine the TMP and TEMP folders to C:\TEMP\ for easy management )

so you can actually use this

del %TMP%\*.* /Q
del %TEMP%\*.* /Q

There's is one problem with deleting files this way. There's usually some files there that's still being used by windows. Thus, they are locked and there's nothing you can do to remove them. the only way is to run this script during boot time or right before windows shut down.

one more things. The default del command is quite primitive as it cannot delete sub directories.
My suggestions is to do a search online and get a more powerful del command that also allows you to delete sub directories. There are such utilities as I've used them before.

Edit: Add attachment for delete.exe utility
Attached Files
File Type: rar Delete.rar (27.8 KB, 2 views)
peaz is offline   Reply With Quote
Old 22nd Feb 2006, 03:53 PM   #3 (permalink)
Administrator!
 
Dashken's Avatar
 
Join Date: 21 Apr 2003
Location: Penang
Posts: 29,763
Reputation: 2162
Dashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond repute
Rep Power: 56
Default

Here's a forcedelete utility that I tried just now. Well, didn't actually try on system file . But I tried to delete an opened zip file. It worked on the locked file. It closed the handle and deleted the file. Nice..

Got it from... http://www.codeguru.com/Cpp/W-P/file...cle.php/c1287/

The *.exe is in this folder.. NtSystemInfo\ForceDel\Release\
Attached Files
File Type: zip ForceDel.zip (21.7 KB, 2 views)
__________________
| Intel Core 2 Duo E6850 @ 3.2Ghz | ASUS P5B-E Plus | G.SKILL 2x1GB DDR2 800 | 6 HDDs (2TB+ only ) | NVIDIA GeForce 7600GT | Dell E248WFP 24" Widescreen |


Blog : Dashken's I-Blog
Gallery : Dashken's I-Paintings
Dashken is online now   Reply With Quote
Old 22nd Feb 2006, 05:45 PM   #4 (permalink)
ARP Webmaster
 
peaz's Avatar
 
Join Date: 13 Oct 2002
Location: http://atpeaz.placidthoughts.com/
Posts: 8,501
Reputation: 1633
peaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant future
Rep Power: 31
Default

actually, you are NOT suppose to force delete those files that are being used in the TMP and TEMP folders... running programs will fail! or shut down! LOL
peaz is offline   Reply With Quote
Old 23rd Feb 2006, 02:51 AM   #5 (permalink)
Super Active
 
1031982's Avatar
 
Join Date: 25 Feb 2003
Location: USA
Posts: 1,580
Reputation: 285
1031982 is a jewel in the rough1031982 is a jewel in the rough1031982 is a jewel in the rough
Rep Power: 9
Default

Yep peaz! That's why I never put those directories in the batch files. Programs use them as a backup, or long term temp files. I just compress them, because one time I deleted them and when I rebooted, a few things didn't open. Then when I tried to do a repair install, it said the setup files could not be found. Luckily, I left them in the recycling bin, so I just un-installed them. After that, everything was fine!
__________________
Running : Gigabyte EP45-DS3R, Intel E7200 C2D, 2GB DDR2 Dual Channel, WD Raptor 74GB, WD 500 GB HDD, ASUS 16X DVD-ROM, LiteOn 16X DVD+/-RW, 1.44 MB Floppy, ATI Radeon HD 3450, Dell 2005FPW, and a SB Audigy2 ZS PRO with Logitech Z5300e speakers.
1031982 is offline   Reply With Quote
Old 23rd Feb 2006, 08:44 AM   #6 (permalink)
Administrator!
 
Dashken's Avatar
 
Join Date: 21 Apr 2003
Location: Penang
Posts: 29,763
Reputation: 2162
Dashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond reputeDashken has a reputation beyond repute
Rep Power: 56
Default

Quote:
Originally Posted by peaz
actually, you are NOT suppose to force delete those files that are being used in the TMP and TEMP folders... running programs will fail! or shut down! LOL
LOL! I didn't say you should use for the TMP or TEMP folders.

Actually I never clear TEMP/TMP files coz sometimes there are installation files in there. Dang... actually I never clean my Internet temp or temp files, unless something goes wrong.

That forcedelete was for you to forcedelete some files or folders that you can't delete coz some apps are using and you don't know which apps and you don't want to restart windows to release it. Last but not least, you have to know what files you are actually deleting to make sure after you delete it, your windows still runs normally.
__________________
| Intel Core 2 Duo E6850 @ 3.2Ghz | ASUS P5B-E Plus | G.SKILL 2x1GB DDR2 800 | 6 HDDs (2TB+ only ) | NVIDIA GeForce 7600GT | Dell E248WFP 24" Widescreen |


Blog : Dashken's I-Blog
Gallery : Dashken's I-Paintings
Dashken is online now   Reply With Quote
Old 23rd Feb 2006, 10:47 AM   #7 (permalink)
ARP Webmaster
 
peaz's Avatar
 
Join Date: 13 Oct 2002
Location: http://atpeaz.placidthoughts.com/
Posts: 8,501
Reputation: 1633
peaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant futurepeaz has a brilliant future
Rep Power: 31
Default

Haha. posting that here might have confused some people mah. But it's a good find. THe only other utility i know of marks files for deletion when the pc restarts. Not forcing the apps to shut down to delete the file.
peaz is offline   Reply With Quote
Old 23rd Feb 2006, 06:41 PM   #8 (permalink)
shutdown -h now
 
hyper_raider's Avatar
 
Join Date: 15 Aug 2003
Location: in front of my pc
Posts: 6,001
Reputation: 1078
hyper_raider has much to be proud ofhyper_raider has much to be proud ofhyper_raider has much to be proud ofhyper_raider has much to be proud ofhyper_raider has much to be proud ofhyper_raider has much to be proud ofhyper_raider has much to be proud ofhyper_raider has much to be proud of
Rep Power: 22
Default

Well if you must delete can you delete the files when windows is shutting down?
__________________
"God does not play dice with the universe."
- Albert Einstein (1879-1955)
http://edward-lim.blogspot.com
hyper_raider is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +8. The time now is 09:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 1998-2007 Tech ARP. All rights reserved.