Archive for the ‘Windows 7’ Category

Loop through each line in a text file using a windows batch file

for /F "tokens=*" %%A in (myfile.txt) do (
   echo %%A

Windows cmd with history

PyCmd is a smart command prompt extension for Windows’ cmd.exe. Its purpose is to emulate a few power features of UNIX shells (decent Tab-completion, persistent history, etc.). You only have to download and unzip the package.

How to find open ports

The following command will show you which ports are open on your computer and what program hold the port:

netstat -anbo

With the following command you can search for an open port:

netstat -anbo|find "61616"

Display system information for Microsoft Windows

Displays complete system information for Microsoft Windows XP Professional or Windows 7 computers.

systeminfo[.exe] [/s Computer [/u Domain\User [/p Password]]] [/fo {TABLE|LIST|CSV}] [/nh]


How to get the directory structure of a drive or path

The tree command displays the directory structure of a drive or path graphically.

tree [drive:][path] [/F] [/A]

/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.

tree c: /F

The dir command allows you to see the available files in a directory.

dir [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

dir /s /b

Deleting the Windows.old directory and setup files after upgrading to Windows 8

  • Go to your Computer
  • Right click on C and select properties
  • Click on Disk Cleanup.
  • Click on Clean up system files. This will change the options in the ‘Files to delete:’ section.
  • Select ‘Older version of Windows’ option and press OK.
Categories: Windows, Windows 7, Windows 8

Edit Windows hosts (file)

For Windows NT, 2000 and above


Registry key underĀ \HKEY_LOCAL_MACHINE\Comm\Tcpip\Hosts

Categories: Windows 7, Windows XP