Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Learning Aids/Tools 2 years ago
Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
Is anyone in this community using a particular technique to achieve batch deletion of temporary data (such as Windows temp folders, browsers cache, etc) for all users?
The tricky part seems to be:
Scripts/batch files could be a solution, but it would require constant monitoring for each product update, to avoid deletion of older files/folder structures...
Your thoughts?
I had the same question, but motivated by the desire to aid my efforts to finish off malware cleanup operations. Here's the command script I wrote with an eye toward modularization so it could be extended easily for future OSes and temp file locations (I wrote this before learning PowerShell and haven't bothered to update it). Because it accesses every users profile folder on the machine as well as Windows system folders, the script must be run with elevated privileges.
@echo off Rem Temp File Purging Tool v1.2.0 Rem Written by Twisty. Created 1/19/2011. Modified 6/28/2011. Rem Rem This script deletes temp files in locations where malware likes to write its initial Rem files for infection and also where standard users have write permissions. Rem Rem This tool isn't likely to be as helpful to clean systems on which users run with Rem Admin permissions. If you let your users run with Admin permissions you by extension Rem give much of the malware on the Internet permission to do as it pleases on your workstations. Rem Identify version of Windows SET WinVer=Unknown VER | FINDSTR /IL "5.1." > NUL IF %ERRORLEVEL% EQU 0 SET WinVer=XP rem 5.2 is actually Server 2003, but for our purposes it's the same as XP VER | FINDSTR /IL "5.2." > NUL IF %ERRORLEVEL% EQU 0 SET WinVer=XP VER | FINDSTR /IL "6.0." > NUL IF %ERRORLEVEL% EQU 0 SET WinVer=VISTA rem 6.1 is actually Windows 7, but for our purposes it's the same as Vista VER | FINDSTR /IL "6.1." > NUL IF %ERRORLEVEL% EQU 0 SET WinVer=VISTA rem Ask user the version if we cannot automatically determine If Not "%WinVer%" EQU "Unknown" Goto :SetUserProfPath Set /P Response="Select OS [X]P, [V]ista/7: " If /i "%Response%" EQU "X" Set WinVer=XP If /i "%Response%" EQU "V" Set WinVer=VISTA If "%WinVer%" EQU "" Echo Invalid response. Exiting.&goto :eof :SetUserProfPath If %WinVer% EQU XP ( Set UserProfileRootPath=C:\Documents and Settings ) Else ( Set UserProfileRootPath=C:\Users ) Call :RemoveSubfoldersAndFiles %SystemRoot%\Temp Rem Walk through each user profile folder Rem This convoluted command is necessary to ensure we process hidden and system folders too for /f "delims=" %%D in ('dir /ad /b "%UserProfileRootPath%"') DO Call :ProcessProfileFolder %UserProfileRootPath%\%%D Echo. Echo Finished! Press a key to exit... Pause>Nul goto :EOF :ProcessProfileFolder Set FolderName=%* Rem Leave if it's not a user profile folder If Not Exist "%FolderName%\ntuser.dat" goto :EOF Rem Leave it's a profile folder on the exclude list If /I "%FolderName%" EQU "%UserProfileRootPath%\Default" goto :EOF If /I "%FolderName%" EQU "%UserProfileRootPath%\Default User" goto :EOF If /I "%FolderName%" EQU "%UserProfileRootPath%\NetworkService" goto :EOF If /I "%FolderName%" EQU "%UserProfileRootPath%\LocalService" goto :EOF Set UserProfilePath=%FolderName% Rem Clean up these folders If %WinVer% EQU XP ( Call :RemoveSubfoldersAndFiles %UserProfilePath%\Local Settings\Temp Call :RemoveSubfoldersAndFiles %UserProfilePath%\Local Settings\Temporary Internet Files Call :RemoveSubfoldersAndFiles %UserProfilePath%\Application Data\Sun\Java\Deployment\cache ) Else ( Call :RemoveSubfoldersAndFiles %UserProfilePath%\AppData\Local\Temp Call :RemoveSubfoldersAndFiles %UserProfilePath%\AppData\LocalLow\Temp Call :RemoveSubfoldersAndFiles %UserProfilePath%\AppData\LocalLow\Sun\Java\Deployment\cache Call :RemoveSubfoldersAndFiles %UserProfilePath%\AppData\Local\Microsoft\Windows\Temporary Internet Files ) goto :EOF :RemoveSubfoldersAndFiles Set FolderRootPath=%* Rem Confirm target folder exists If Not Exist "%FolderRootPath%" Goto :EOF Rem Make the folder to clean current and confirm it exists... CD /D %FolderRootPath% Rem Confirm we switched directories If /I "%CD%" NEQ "%FolderRootPath%" Goto :EOF Rem ...so that this command cannot delete the folder, only everything in it Echo Purging %CD% RD /S /Q . >>nul 2>>&1 goto :EOF
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.