Question:
Script to automate deleting temp folders.?
hariharan
2010-01-24 22:43:40 UTC
I want to automate deleting files in an temp folder, temp folder means not temp internet files or cookies.
please suggest me with some working script.
Seven answers:
?
2010-01-25 00:29:01 UTC
In Linux you would just do something like this:



$ rm -rf /tmp/*
2016-05-26 08:46:50 UTC
Hello, (ANS) The REAL answer here is that some of the "temp" folder are actually required either by the operating system itself or by a program (application). **Both the operating system or programs use a temp folder as a temporary storage location for example when downloading & installing windows XP or windows Vista updates, or updates perhaps for your anti virus software. NOTE: Therefore NOT ALL temp folders should be actually deleted. LEAVE the TEMP FOLDERS ALONE!! do NOT delete them is my advise. **Some temp folders are used as a temporary memory caches: for example Internet Explorer web browser. **However, its the contents i.e. whats inside the folder that is much more important here. Thats why using a program CCleaner is recommended over trying to manually remove the contents of the temp folders or temp caches. **some temp folders may have special permissions set on them so this is why its NOT such a good idea to try and remove them. You might do more harm than good attempting to delete them. Also you may find some of the temp folders are NOT deletable anyway because you don't have ownership or control over them i.e. those used by the OS itself. Hope thats useful? Kind Regards Ivan MCSE trained, computer veteran.
Paul W
2010-01-24 23:01:52 UTC
The typical linux machine has several shell scripts that would serve as examples to get started with. For example there is one that runs every 30 minutes to find and purge old php session files. Of course it probably turns out you are not using linux. Most windows users post questions here without mentioning the OS they are using. You also use the word "scripts" without mentioning what language they might be written in.
2010-01-24 22:59:07 UTC
What programming language do you require?

You can actually do this using batch file (.BAT)

Just use the Windows Scheduler to execute it on the date/time you prefer.

Hope this helps.
The Q
2010-01-24 23:54:33 UTC
you will have to create your own .bat file in notepad using the windows command interface.

Consult www.ss64.com for the commands.
helen
2014-12-01 01:26:28 UTC
problematic problem. search with a search engine. that will can assist!
?
2010-01-25 01:59:54 UTC
you are download c-Clener by usingng google


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...