October 29, 2012

Ninite: Install / Update Multiple Apps at Once

Got a new computer and need to set it up with your favourite applications? Ninite helps you to install and update multiple applications at once. It is available for download @ http://ninite.com/.

Note that it does not contain all the software/applications. However, it is still a very good idea and tool to be aware of.

October 25, 2012

Rename Multiple Files in Windows

“Bulk Rename Utility” is a utility that helps you rename multiple files in a jiffy. Few very good ways you can benefit from this tool are listed below:

  • Add/replace/remove text to/from the file names.
  • Support for regular expressions is a big plus.
  • Rename the files based on the EXIF header data of images.
  • Rename the files based on the ID3 tag data of MP3 files.
  • Preview the changes before applying.

The tool is available for download @ http://www.bulkrenameutility.co.uk/.

One downside is that the interface appears quite cluttered and not easily usable. As such, it takes a little time to get used to it.

October 22, 2012

Techbits #25: Cygwin – Unix on Windows!

Have you ever wished if you had the ability to use UNIX shells (like “bash”), commands or scripts on Windows to make yourself more productive from the resulting power and flexibility? And, should it be something free and not commercial like “MKS Toolkit”? If so, then this Techbit is for you.

Cygwin is what you are looking for and accessible from http://www.cygwin.com/. There are a huge number of packages available that you can install additionally to spruce up and spice up your Cygwin setup.

Go on and wake up your Windoze with Cygwin! :)

October 11, 2012

Techbits #24: “nslookup” works but “ping”, “telnet” etc. don’t?

This Techbit is for those souls that work on Solaris platform. It may be applicable on other Unix-based platforms as well but I've not verified it.

A friend of mine told me he has configured the name servers correctly in /etc/resolv.conf after which he could get "nslookup" working but not the other commands like "ping", "telnet" etc. Why?

The answer lies in that "nslookup" does DNS lookups using /etc/resolv.conf where as "ping", "telnet" etc. refer to /etc/nsswitch.conf to find out the mechanisms to use for name resolutions.  If DNS is not listed here, then /etc/resolv.conf is not going to be referred to. Therefore, make sure DNS is listed as a source for host resolution in /etc/nsswtich.conf.

Another command to do such verification is 'getent hosts' - this is like nslookup but pays attention to /etc/nsswitch.conf additionally.

Thus, to summarize which configuration file does each of the commands depend on:

nslookup - /etc/resolv.conf

ping - /etc/nsswtich.conf

telnet - /etc/nsswtich.conf

getent hosts - /etc/resolv.conf, /etc/nsswtich.conf

October 5, 2012

Techbits #23: Export comments from Word document

There could be scenarios where one encounters the need to export/extract all the comments from a word document into - say, a word document or an excel sheet. This techbit is precisely going to address such usecase.

All that you would need to do is define the following Macros and just use (run) them afterwards. The Macros can be seen by following the Word document's menu path "View >> Macros >> View Macros".

Exporting comments into an Excel file

Create a Macro named exportCommentsIntoExcel with the following definition:
Sub exportCommentsIntoExcel()

Dim cmt As Word.Comment
Dim doc As Word.Document
Dim commentsFile As String
Dim row As Integer

commentsFile = ActiveDocument.FullName & " - Comments.xls"

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Add()

row = 1

For Each cmt In ActiveDocument.Comments
    objExcel.Cells(row, 1).Value = cmt.Initial & cmt.Index
    objExcel.Cells(row, 2).Value = cmt.Range.Text
    row = row + 1
Next

objWorkbook.SaveAs (commentsFile)

End Sub
Select the Macro thus created and "Run" it.

The comments should be available in an excel file in the same directory as the source word document and with the suffix "- Comments" in its name.

Exporting comments into a Word document

Create a Macro named exportCommentsIntoWord with the following definition:

Sub exportCommentsIntoWord()

Dim s As String
Dim cmt As Word.Comment
Dim doc As Word.Document

commentsFile = ActiveDocument.FullName & " - Comments.doc"

For Each cmt In ActiveDocument.Comments
    s = s & cmt.Initial & cmt.Index & "," & cmt.Range.Text & vbCr
Next

Set doc = Documents.Add
doc.Range.Text = s
doc.SaveAs (commentsFile)
End Sub
Select the Macro thus created and "Run" it.

The comments should be available in a word document in the same directory as the source word document and with the suffix "- Comments" in its name.