Windows Guides Feed

Information Use a Script to Get Sizes of Temporary Folders with Just One Click [How To]There are several folders in your computer that can increase size without you having knowledge of it. It’s very common that programs use temporary files. Every browser also uses caches and cookies.

The Folders

Some of these applications don’t delete these files after they are used. In this post I am going to explain how to obtain information about the size of the following folders:

Temporary Folder

This folder which is usually located at “C:\Users\<username>\AppData\Local\Temp” is used for almost every program to store its temporary files.

Internet Explorer 8 Cache

Internet Explorer usually locates at “C:\Users\<username>\Local Settings\Temporary Internet Files\” its cache files. These files allow this program to display webs faster.

Internet Explorer 8 Cookies

Cookies from Internet Explorer 8 are stored at “C:\Users\<username>\Local Settings\Temporary Internet Files”.

Profile

Your personal information is located at “C:\Users\<username>\”.

Chrome Cache

This browser store its cache files at “C:\Users\<username>\Appdata\Local\Google\Chrome”.

These folders are used by Windows 7, but don’t be alarm if you are a Windows XP user because the script is going to handle this.

Use a Script to Get Temporary Folder Information

The bat file for Windows 7 and Vista that will show the information is the following:

@echo off

echo Temp Folder
For /F "tokens=*" %%a IN ('"dir /s %temp% | find "File"" ') do set last=%%a
echo %last%

echo IE 8 Cache
For /F "tokens=*" %%a IN ('"dir /s "%localappdata%\Microsoft\Windows\Temporary Internet Files" | find "File""') do set last=%%a
echo %last%

echo IE 8 Cookies
For /F "tokens=*" %%a IN ('"dir /s "%appdata%\Microsoft\Windows\Cookies" | find "File""') do set last=%%a
echo %last%

echo Profile
For /F "tokens=*" %%a IN ('"dir /s "%userprofile%" | find "File""') do set last=%%a
echo %last%

echo Chrome Cache
For /F "tokens=*" %%a IN ('"dir /s "%localappdata%\Google\Chrome\User Data\Default\Cache\" | find "File""') do set last=%%a
echo %last%

pause

For Windows Xp use:

@echo off

echo Temp Folder
For /F "tokens=*" %%a IN ('"dir /s %temp% | find "File"" ') do set last=%%a
echo %last%

echo IE 8 Cache
For /F "tokens=*" %%a IN ('"dir /s "%userprofile%\Local Settings\Temporary Internet Files\Content.ie5" | find "File""') do set last=%%a
echo %last%

echo IE 8 Cookies
For /F "tokens=*" %%a IN ('"dir /s "%userprofile%\Local Settings\Temporary Internet Files\" | find "File""') do set last=%%a
echo %last%

echo Profile
For /F "tokens=*" %%a IN ('"dir /s "%userprofile%" | find "File""') do set last=%%a
echo %last%

echo Chrome Cache
For /F "tokens=*" %%a IN ('"dir /s "%userprofile%\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache\" | find "File""') do set last=%%a
echo %last%

pause

Create the file

Press Winkey + R, type notepad and press Enter.

Copy the script to that window, you should see something like this:

Untitled Notepad Folder Information Use a Script to Get Sizes of Temporary Folders with Just One Click [How To]

Press File, save As:

Notepad Save As ShowTempFolderInformation bat Use a Script to Get Sizes of Temporary Folders with Just One Click [How To]

Don’t forget to use ¨¨so the bat file can be created with the right extension.

Now you only have to double-click the file to execute it:

Folder Information Command Line Use a Script to Get Sizes of Temporary Folders with Just One Click [How To]



 Use a Script to Get Sizes of Temporary Folders with Just One Click [How To]

About Angel Luis

I am an Engineer of Telecommunications that love computers. My first computer was a Commodore 16kb, about 25 years ago and since then I am always fighting computers problems. Please visit my entries and ask me about whatever problem you have, I will be pleased to help you. My email is discoveryourpc [at] gmail [dot] com. You can follow me on twitter @agenlu or read my blog www.discoveryourpc.net

Free PC tips by email

Search Windows Guides




Comments

  • Anderson Gosselen

    Hi,
    I did the whole procedure and did not work, I am using Windows XP SP3!

    • http://discoveryourpc.net Angel

      Sorry I just fix that, try it again.

    • http://discoveryourpc.net Angel

      Sorry I just fix that, try it again.

  • Shan

    Same here winXP sp 2 and it’s not working. The command prompt just disappears after double clicking.

    • http://discoveryourpc.net Angel

      Try again please Shan.

    • http://discoveryourpc.net Angel

      Try again please Shan.

  • http://discoveryourpc.net Angel

    Sorry, It doesn’ work in Windows XP. I am going to solve it now.

  • http://discoveryourpc.net Angel

    It should work now. A problem with HTML code.

    As the script look for the word “file” it will only work with the English language.

    Change that on the script if you just need it to work in other language.

  • http://discoveryourpc.net Angel

    In Windows Xp it only work for the first folder.

    I will solve that on Monday.

  • http://discoveryourpc.net Angel

    I think is working now

  • Henry-systems

    HI
    I’ma User, windows vista and windows 7 in Portuguese.
    In the office I use windows vista and home 7.

    I tested the script with the necessary changes to Portuguese and it worked.
    For those who have problems follows:

    @echo off

    echo Temp Folder
    For /F “tokens=*” %%a IN (‘”dir /s %temp% | find “arquivo”” ‘) do set last=%%a
    echo %last%

    echo IE 8 Cache
    For /F “tokens=*” %%a IN (‘”dir /s “%userprofile%AppDataLocalMicrosoftWindowsTemporary Internet Files” | find “arquivo””‘) do set last=%%a
    echo %last%

    rem echo IE 8 Cookies
    rem For /F “tokens=*” %%a IN (‘”dir /s “%userprofile%AppDataTemporary Internet Files” | find “arquivo””‘) do set last=%%a
    rem echo %last%

    echo Profile
    For /F “tokens=*” %%a IN (‘”dir /s “%userprofile%” | find “arquivo””‘) do set last=%%a
    echo %last%

    pause

    Not yet tested on windows 7.
    Then put on the windows 7

    Grateful

    • http://discoveryourpc.net Angel

      Thanks Henry-systems


Computer tips in your inbox
Sign up for the Windows Guides newsletter to get PC tips and access to free Windows books (More details)

Enter your email address:
 

Popular Guides

See which sites have been visited on your PC (even if private browsing mode is used)

Create a Windows 7 System Repair Disc

Best Free Anti-malware

Hibernate vs. Sleep vs. Shut-Down

i3, i5, and i7; Dual, Quad, Hexa Core Processors. How to they Differ?

Intel's Ivy Bridge Processor: new Features

Submit Your Tip
Submit your computer tip to us; receive full credit for all published tips

Windows Guides on Facebook