anchor.diff:  :: Purpose:       Temp file cleanup
   :: Requirements:  Admin access helps but is not required
   :: Author:        vocatus on reddit.com/r/sysadmin ( vocatus.gate@gmail.com ) // PGP key ID: 0x82A211A2
  -:: Version:       3.4.5 * Add cleaning of Internet Explorer using Windows built-in method. Thanks to reddit.com/user/cuddlychops06
  -::                3.4.4 ! Fix minor bug where a comment inside a FOR loop was breaking the loop and throwing unnecessary error messages. Thanks to reddit.com/user/saeraphas
  +:: Version:       3.5.0 + Add removal of C:\Windows.old folder if it exists (left over from in-place Windows version upgrades). Thanks to /u/bodkov
  +::                3.4.5 * Add cleaning of Internet Explorer using Windows built-in method. Thanks to /u/cuddlychops06
  +::                3.4.4 ! Fix minor bug where a comment inside a FOR loop was breaking the loop and throwing unnecessary error messages. Thanks to /u/saeraphas
   ::                      ! Fix minor directory inconsistencies across Windows Server 2003 and 2008
  -::                3.4.3 + Add cleaning of Windows CBS logs. Thanks to reddit.com/user/savagebunny
  +::                3.4.3 + Add cleaning of Windows CBS logs. Thanks to /u/savagebunny
   ::                      + Add cleaning of additional Chrome location
  -::                3.4.2 + Add cleaning of Chrome cache. Thanks to reddit.com/user/savagebunny
  -::                3.4.0 ! Fix failing FOR loops due to missing opening or closing quotes. Thanks to reddit.com/user/savagebunny
  +::                3.4.2 + Add cleaning of Chrome cache. Thanks to /u/savagebunny
  +::                3.4.0 ! Fix failing FOR loops due to missing opening or closing quotes. Thanks to /u/savagebunny
   ::                      ! Fix broken Flash cookie cleanup section
   ::                      ! Fix broken logging in some sections (was calling obsolete %LOGFILENAME% variable instead of %LOGFILE%)
   ::                      * Improve OS detection routine; OS version checks now more fine-grained
   ::                      * Improve hotfix cleanup and server media file cleanup
   ::                      * Split all jobs into Windows version-specific and version-agnostic jobs for better readability
  -::                3.3a  / Minor header cleanup; Variables section now about PREP AND CHECKS
  -::                3.3   / Renamed VERSION and UPDATED to SCRIPT_VERSION and SCRIPT_UPDATED
  -::                3.2   * Reworked CUR_DATE variable to handle all Windows date formats regardless of local date-time format
  -::                2.9   * Update user temp file deletion to loop through every users temp files instead of just current user.
  -::                        Thanks to reddit.com/user/srisinger
  -::                2.8   + Add emptying of ALL user's recycle bins
  -::                2.7   + Add removal of C:\AMD folder
  -::                      + Add removal of C:\ATI folder
  -::                      * Tweak job footer to include what user the script executed as
  -::                2.6   + Improve detection of Windows XP/2003 hotfix folders
  -::                2.5   + Improve detection of operating system and added new OS detection section near script start
  -::                      + Add section to remove C:\Windows\Media on Server-based operating systems
  -::                      - Comment cleanup and removal of unneeded error piping (2>&1)
  -::                2.2   + Log files now rotate and delete old versions
  -::                2.0   * Major re-write
  -::                         + Added section to test for and delete hotfix uninstallers on XP
  -::                         + Added log file
  -::                1.8   / Split into USER and SYSTEM subsections 
  -::                1.7   + Add section to delete Windows update log files and built-in .bmp files
  -::                1.6   / Change some delete flags to /F /S /Q instead of just /F /Q
  -::                        The "/S" flag says to recurse into subdirectories. 
  -::                1.5   + Add new areas to clean -- %TEMP%\ folder
  +::                <-- outdated changelog comments removed -->
   ::                1.0     Initial write
   SETLOCAL
   
  
positive.code: :::::::::::::::::::::
  @echo off
  %SystemDrive% && cls
  set SCRIPT_VERSION=3.4.5
  set SCRIPT_UPDATED=2014-10-02
  :: Get the date into ISO 8601 standard date format (yyyy-mm-dd) so we can use it
  FOR /f %%a in ('WMIC OS GET LocalDateTime ^| find "."') DO set DTS=%%a
  set CUR_DATE=%DTS:~0,4%-%DTS:~4,2%-%DTS:~6,2%
  
negative.code: 		del /F /Q "%%x\Local Settings\Temporary Internet Files\*" >> %LOGPATH%\%LOGFILE% 2>NUL
  		del /F /Q "%%x\Local Settings\Application Data\ApplicationHistory\*">> %LOGPATH%\%LOGFILE% 2>NUL
  		del /F /Q "%%x\My Documents\*.tmp" >> %LOGPATH%\%LOGFILE% 2>NUL
  		:: some reports of this messing up Chrome by forcing a hard reset of its cache. It apparently still tries to read from cache when it's been manually cleared.
  		::del /F /S /Q "%%x\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache\*" >> %LOGPATH%\%LOGFILE% 2>NUL
  		del /F /S /Q "%%x\Local Settings\Application Data\Google\Chrome\User Data\Default\Local Storage\*" >> %LOGPATH%\%LOGFILE% 2>NUL
      )
  )
  