You are browsing the archive for Windows.

Getting the directory path of the batch file

August 17, 2012 in Windows

It may be useful to get the current path of the batch file in order to perform operations in relative directories. In order to do this you can use the “%~dp0” symbol. For example:

cd %~dp0reports

This command means that the prompt will access the folder “reports” under the directory containing the batch file.

The Quickest and Most efficient way to cleanup Windows temp

August 10, 2012 in Windows

Cleaning up the Windows XP temp folder from the Windows explorer is a tedious task especially if you have thousands of files inside it.

In order to clean it up quickly, you can use a cleanup windows software or open the command line and enter the following four commands:

cd %tmp%
rd /s .
cd %windir%/temp
rd /s .

These commands will remove all of the temp folders content efficiently (Do not worry if you see some files are not deleted because they are currently used by the system, in order to delete these set of files, just restart your system and re-execute these commands again).

Skip to toolbar