Google
 

Saturday, March 22, 2008

Metamorphosis

Welcome to my blog.

As this is my "virgin" post and having been in the IT line for quite a while, I shall share and discuss some of my thoughts, experiences and other stuffs that comes to mind, mainly IT related matters.

Most of the links in this blog opens in a new window, readers using IE7 or Firefox Ver. 2 can open these links in a new tab by holding onto the Ctrl key and clicking on the links.

Readers who wants to purchase software/hardware or simply shop at Amazon.com can just click on the links on the top left corner of this blog. Your support is deeply appreciated.

For this post, I shall touch on two commands, Robocopy and Diskpart which is useful in copying files and formatting/partitioning hard disk. Diskpart prove to be an useful utility when I purchase a new portable harddisk and Disk Management snap-in was not able to partition/format it. You can read more about it in the Diskpart section.

Those who had read futurist Alvin Toffler's Future Shock would realize that much of what he had predicted is happening now. In a nutshell "too much changes in too short a period of time" and this book was written more than three decades ago!

Changes and advancement is happening at an exponential rate and impacts us and society in many aspects. The cliche "the only thing constant is change" rings true. There are more changes happening in our time as compare to our parents.

I use to adopt the three "A"s in any changes, i.e. Adapt, Adjust and Accomodate. But seems like that is not enough. To stay relevant we now have to use the three "R"s, that is Realign, Relearn and Reinvent ourselves.

A friend of mine, Jane, who has a daughter was staying with her mother. Disagreement happens time to time between Jane and her mother on how best to look after and discipline her daughter. In one of these disagreements, Jane was telling her mother that her way was right as she had read books on bringing up children when her mum retorted "Well, I didn't need to read any books on bringing you up and you turn out fine"

We can be certain that changes is one of the certainties along with death and taxes.


Robocopy (Robust File Copy Utility) In Place of Xcopy In Windows Vista

In Windows Vista, if you were to type "xcopy /?" you would notice this message "NOTE: Xcopy is now deprecated, please use Robocopy." You can still use xcopy with all its functionalities but seems like Microsoft strongly advise users to use Robocopy instead of Xcopy.

Robocopy is now a built in standard command in Windows Vista. Well, this utility is not exactly something new, in Windows XP you can find it in the Windows Resource Kit.

Robocopy is a command line program, for those who prefer visual there is a graphical user interface (GUI) version which you can download from here http://download.microsoft.com/download/f/d/0/fd05def7-68a1-4f71-8546-25c359cc0842/UtilitySpotlight2006_11.exe

Below are just some of the advantages of using Robocopy instead of Xcopy.
1. Failed file copies can resume from point of failure
2. Able to correctly copy NTFS ACLs
3. Control over time between retries and no. of retries to attempt before giving up
4. Able to maintain an exact mirror of the source directory tree
5. Better audit trail on copy activities

Syntax for Robocopy:
ROBOCOPY source destination [file [file]...] [options]
source: Source directory (drive:\path or \\server\share\path)
destination: Destination directory (drive:\path or \\server\share\path)
file: File(s) to copy (names/wildcards - default is "*.*")
options: Command-line options you wish to use

Typing "robocopy /?" would list out all the options.
If no files are listed, Robocopy defaults to all files (*.*).

Important Note to Vista users: Use Robocopy with the /XJ option when copying user accounts

It is important to use the /XJ (eXclude Junction) option when copying user accounts to another location in Windows Vista. There are several junction points in the path of user accounts that points back to its parent folders. Thus a loop is form and crashes Robocopy.
Picture on left shows the junction points on my notebook's user account. Click on the picture to see an enlarge version.

Similar to symbolic links, junction points link only to folders and volumes. It can be associated with files, but with restriction. The file must belong to the same logical volume, using hard links. To view junction points, type "dir *. /a:s" in a command prompt.



Diskpart To Replace Fdisk In Windows Vista

Use this utility with extreme caution and care when doing partitioning. If you selected a wrong drive all data on that drive would be wiped out.


Diskpart is one of those utility whereby you rarely used. But it is a God send when the occasion calls for it.

Diskpart was used last week to partition and format a new external 160GB Hitachi harddisk. After I had plug in the new external harddisk to the USB port, I could not see it appear in Windows Explorer. Using the Disk Management snap-in in administrator mode, I could see the new harddisk as a "raw" harddisk with no partition created.


Right-click on the "raw" disk shows that most of the important functions needed like Format, Shrink Volume, Delete Volume and Extend Volume grays out. Since Fdisk is no longer available in Windows Vista, Diskpart was used to partition/format the new hard disk.


According to Microsoft, "The Disk Management snap-in prohibits you from inadvertently performing actions that may result in data loss." Diskpart enables a superset of the actions that are supported by the Disk Management snap-in and also explicit control of partitions and volumes. You can read more on this Microsoft support link. The info. is quite comprehensive.


Unlike many command line programs, Diskpart does not operate in a single-line mode. Instead, commands are read from standard input/output (I/O) after you started the utility. After typing "diskpart" (without the quotes) in a command prompt, another command prompt would pop up and you run your Diskpart commands in the second ("pop up") command prompt (see picture below)



Typing "?" at the DISKPART> prompt would show you all the commands.

No comments: