Showing posts with label Tips and Tricks. Show all posts
Showing posts with label Tips and Tricks. Show all posts

Friday, April 25, 2008

Redirecting The Ouput of a Command to the Clipboard

I very often use the command line to list file names using the dir command (for web design and other purposes). I usually need to have those file names in notepad. One way to do that is to redirect the command ouput to a file (copy the text from the file then delete it) or mark the text in the command line window and press Enter to copy it to the clipboard. A nicer and cleaner way though is to redirect the output of the command to the clipboard. Unfortunately there's no built-in way for doing this in Windows XP, however, it can be added very easily. In Windows 2003 we have a file called clip.exe (under the Windows or system32 directory, not sure, so search for it), which we can use to redirect the output of any command to the clipboard, but first if you're using Windows XP, copy this file to the Windows or System32 directory on your computer (obviously you'll need a computer with Windows 2003 to get this file, you might as well try seraching the internet, it's most probably there).

Now to redirect the output of your command to the clipboad, just use a pipe with clip, for example:

dir /b | clip

* If you're wondering what the /b switch does, it displays the bare file names (only the file names with no headers or any other information)

Thursday, April 24, 2008

My Favorite Windows Keyboard Shortcuts

I'm pretty much a keyboard freak, I don't really use the mouse unless I'm forced to :) or in other words, unless I want to do something that cannot be done using the keyboard. In case you didn't know that, you can actually move the mouse cursor using the keyboard, this a feature called MouseKeys which I use when I have a problem with the mouse. To activate MouseKeys, press and hold the left Shift and left Alt keys then press the Num Lock key (you may search google for MouseKeys to get more details about that and to know what keys you should use to move the mouse, they are the Numpad keys by the way)

I use keyboard shortcuts in most applications (IE, FireFox, HTML Help .. etc), but I'm going to list here only the Windows Keyboard shortcuts (by the way, I use Windows XP but most of these keyboard shortcuts are from earlier versions starting from Windows 95, note though that a few of these keyboard shortcuts don't work in Vista but the majority do). So, here's a list of the keyboard shortcuts that I use quite frequently in Windows (or more accurately what I remember now):

  • Ctrl + Shift + Esc (to show the task manager)
  • Alt + Enter (while an icon is selected, e.g. a file, a folder or an icon on the desktop, to open the properties window for that icon)
  • Windows Key + Pause (to show the System Properties window)
  • Windows Key + E (to open a Windows explorer window, I follow this by Ctrl + E twice to hide the folders view)
  • Windows Key + F (to show the serach window)
  • Ctrl + E or Ctrl + F (while in a folder window to show the search side panel)
  • Alt + D (while in a folder window to move the focus to the address textbox in the address bar)
  • Alt + Space (to activate the system menu of an application)
  • Alt + Space + X (to maximize the current window, press them in the same sequence)
  • Alt + Space + N (to minimize the current window, press them in the same sequence)

MDI Applications Keyboard Shortcuts

  • Ctrl + F4 (to close the currently active MDI child window)
  • Alt + - (to activate the system menu for the currently active MDI child window)
  • Alt + - + X (to maximize the current MDI child window, press them in the same sequence)
  • Alt + - + N (to minimize the current MDI child window, press them in the same sequence)
  • Ctrl + F6 (to move focus between child MDI windows)

Using the Keyboard with the Mouse

  • Double clicking an icon while holding the Alt key (this will open the properties window for this item instead of opening/running the item itself)
  • Double clicking a folder icon while holding the Ctrl key (this will open the folder in a new window, note that the folder has to be unselected before you double click it)

Tuesday, January 8, 2008

Installing Windows XP in Virtual PC

When you create a new virtual machine in Virtual PC (2007 and earlier), you choose the operating system you want to install on that virtual machine so that the virtual machine settings are optimized for that operating system. Now when you choose Windows XP from the list of operating systems, you get a default value of 128 MB for the memory, don't use that default value! If you do, Windows XP will take ages to install on your virtual machine, so, change the default value to be at least 256 MB. This will make a huge difference.