Archive for the 'Tips and Tricks' Category

The report I use most often

Tuesday, February 3rd, 2009

As a developer, the “Only Files” report is most useful to me. When using Visual Studio 2005, I often have my ASP.NET web site projects several levels deep. I keep a copy of the actual web site in another location from where I upload it by ftp to the server. This is so because the web.config in the local project and in production web site is different and uses different connections and flags.

When I have made modifications to my ASP.NET project and want to deploy them to production, I want to carefully see the list of files I have changed recently and then decide which ones I want to copy over. I could use an automatic folder syncing tool. But I’m wary of such tools that often do not give enough customization choices and one mistake can wipe out lot of work.

I use the “Only Files” report in ShowSize to quickly get a list of files I have changed in the project no matter where they are located within the project structure. Here is a picture:

Use in ASP.NET projects

As you can see above, this report lists “all” the files in my asp.net project in a single list. That means I get to see all the files even if they are in different folders deep inside. The advantage of a single list is that I can sort them by size or date. Here, the list is reverse sorted on “modified” date. I can see that I changed 6 files today, excluding the cterrors.txt that I know is not a file I changed by hand. Now I can right-click on a file and open its parent folder in explorer. Or, I can even right-click and do the explorer operation copy straight away.

The same concept will apply to any job whether it is web design or managing document collections. If your files are in several folders, the “only files” is going to give you a better picture of the changed or large size files than the regular single-folder file reports.

Redirecting the working folder used by ShowSize

Friday, December 19th, 2008

I’m scanning a huge disk with ShowSize and Windows is reporting a disk space shortage error. What folder does ShowSize use to keep its scanned results? Can that folder be redirected?

ShowSize uses the default “temporary” folder set up in Windows. You can redirect it by using any of the tips found on microsoft.com or other Windows web sites. Just type “redirect temporary folder in windows” on Google and you may find many tips on this.

I will try to explain the steps below.

First, you can verify that ShowSize is indeed using the temporary folder set up in Windows. To do this, first click on Start–Run in Windows to bring up the Run prompt. On Windows Vista, type Run in the Search Box that appears at the bottom on the Start menu. Type %temp% in the Open box and click OK. This will open the temporary folder. If ShowSize is running, you will see some file names starting with drm and drv there. These temporary files disappear as soon as you stop ShowSize.

You need to redirect this temporary folder by specifying another folder on a drive that has plenty of space. Once you do that, all your programs including ShowSize will start using the new location to store temporary files.

Here are the steps to redirect this temporary folder.

  • Right click on the My Computer icon on desktop to see Properties.

  • Select the Advanced page (or Advanced System Settings on Vista).

  • Click on the “Environment Variables” button. It displays the Environment Variables as shown below.

    environmentvariable.bmp

  • The variables that we want to change are TMP and TEMP in the User Variables.

    In the “User variables” frame, select the TMP variable and click on Edit button. Type new value as a folder on some other drive where there is plenty of space, for example, “E:\TEMP”. Don’t use the root of the drive as some programs can face problems. Always use a subfolder that you create specifically for this purpose.

    TMP.bmp

    Similarly, edit the value of the TEMP variable too to point to the new location above.

    TEMP.bmp

The same steps should work on Windows XP, Windows 2000, 2003 and Vista. But sometimes the redirection will work only after a reboot.

You can verify whether the temporary folder is redirected properly by following the same procedure that I explained at the top of this article to look for DRM and DRV files when running ShowSize.

System variables: What about the TMP and TEMP variables in the lower System Variables list? If you change them, they are set up for all the users of the computer but then they should be deleted from the user variables list of all the users. If you don’t understand this, it’s ok. It is an advanced concept.