Saturday, October 23, 2010

useful dos command

ipconfig - Windows IP configuration
Useful for troubleshooting your internet connection. Displays the current IP address of your computer and the DNS server address. If you call your ISP for reporting a bad internet connection, he will probably ask you to run ipconfig.

fc - Free BeyondCompare in XP
FC is an advanced DOS Command that compares two files and displays the differences between them. Though the file comparison results are not as interactive as BeyondCompare or Altova DiffDog, fc is still very useful. You can even set fc to resynchronize the files after finding a mismatch.

type - open text files sans Notepad
Similar to Unix cat command, Type is my favorite DOS command for displaying the contents of a text files without modifying them. When used in combination with more switch, type splits the contents of lengthy text files into multiple pages. Avoid using the type command with binary files or you'll hear alien PC beeps and see some greek characters on your PC.

ping - Say hello to another computer
Ping network command followed by the web-address or IP address tells you about the health of the connection and whether the other party is responding to your handshake request. Ping tool can also be used to convert the web address to a physical IP address.

tree - visual directory structure
You often need to take prints of your physical directory structure but XP has no simple "visual" commands for printing directory contents. Here, try the Tree DOS command and redirect the output to a text file.

tree > mydirectory.txt
print mydirectory.txt

attrib - make hidden files visible
Attrib lets you change attributes of System files and even hidden files. This is great for troubleshooting Windows XP. Say your XP doesn't boot ever since you edited that startup boot.ini file (Hidden), use attrib to remove the Hidden attibute and edit the file using EDIT dos command.

assoc - which program will open that .xyz file
The assoc DOS command can be used to either isplay or even modify the file name extension associations. The command assoc .htm will quickly tell you the name of your default web browser (see picture)

move - more flexible than copy-paste
Say you got a lot of XLS and DOC files in you MyDocuments folder and want to move only those XLS files that have their name ending with 2006. In XP Explorer, you have to manually select each file and then cut-paste to another folder. However, the DOS move command make things much simpler. Just type the following at the command prompt:
move *2006.xls c:\2006Reports\

find - advanced file search with filter
Find is the most powerful DOS command and even more useful than the Windows Desktop Search tool or the Windows Find Wizard. The find command searches for a specific string of text in a file or files. After searching the specified file or files, find displays any lines of text that contain the specified string.

To search your hard disk to find and display the file names on drive C: that contain the string "Google" use the pipe (|) to direct the results of a dir command to find as follows:
dir c:\ /s /b | find "Google"

Quick tip - Drag to avoid typing: When your command acts on a file or folder, you must type the path to that folder after the command. You can save typing time by dragging the file or folder from Windows Explorer into the command window.

Sunday, January 17, 2010

office 2007

Save as .doc instead of .docx in Word 2007
By Walter, January 13, 2007 11:03 pm
While the new .docx format in Word 2007 promises great things, for now most of the people you’ll be working with are still using Word 2003 or (gasp) an even earlier version. The .doc format remained virtually unchanged in Word 97-2003 and is still supported in Word 2007. But Word 2007 by default saves files as .docx documents, meaning that when you need to share with someone using a previous version you have to open the .docx file you created and save it as a .doc file.

If you work with folks that use previous versions of Word, you can change the default format Word 2007 uses to save a file. To do this, use the following steps:

In Word 2007, click the Office button (the big round button at the top left of the Window) and then click Word Options.
In the Word Options dialog box, choose the Save category from the list on the left.
Use the Save files in this format drop-down menu to choose the format you want Word 2007 to use by default. I use Word 97-2003 Document (*.doc).
Click OK.


When you save a new file, if you really want to save it as a .docx file, you can always choose that format from the list in the Save As dialog box.

Microsoft also has an Office Compatibility Pack available for users of Office XP and Office 2003 for opening documents created in Office 2007 (Word, Excel, and PowerPoint)