Monthly Archives: March 2008

Progressive Dots

I just found out about this (thanks to Live Search!) from a fellow Canadian’s blog entry "batch file snippets" and it’s got me super excited.

Haven’t you ever found it annoying that you can’t print to a line without a newline (carriage return/line feed) in a batch script?  (At least, I didn’t know how to.)  Well, now you can!

For instance:

echo Copying files .

for %%f in (A B C D) do (
    echo .
    xcopy %%f %DEST% /cqy 2>&1>NUL
)

would give you:

Copying files .
.
.
.
.

as opposed to a progressive:

Copying files ….

So what you actually want is:

set /p CRLF=Copying files .<NUL
for %%f in (A B C D) do (
    set /p CRLF=.<NUL
    xcopy %%f %DEST% /cqy 2>&1>NUL
)

Don’t tell me that’s not cool!  How does it work?  The ‘/p’ option given to set is asking for user input:

SET /P variable=[promptString]

The /P switch allows you to set the value of a variable to a line of input entered by the user.  Displays the specified promptString before reading the line of input.  The promptString can be empty.

The key is that it prompts for input *on the same line*!  And by redirecting the NUL device into it, you get an immediate return.  How absolutely clever.

I love it!

To Sync, or not to Synch?

I tend to nitpick.  I have a bit of OCD when it comes to grammar and spelling.  I cringe when people use "it’s" instead of "its" or "your" instead of "you’re".*  I find it distasteful that people allow themselves to butcher a language (though I suppose non-native speakers can be given a bye).  So it’s not surprising that I have fairly strong feelings about the abbreviation for the word "synchronize" (or "synchronise", as you prefer).

It really bothers me when people write "synch".  I realize that both "sync" and "synch" are commonly accepted abbreviations; however the latter irks me to no end.  Why?  I read "synch" as rhyming with "lynch".  I realize that there are words that end with -ch with a hard ‘k’ sound (say, "loch"), but how many words end with -ynch (or -inch) with a hard ‘k’ sound?!  If you’re going to cut a word in half, at least have the decency to do it so that it follows general conventions of pronunciation.

I do also realize that languages are a fluid subject that are influenced by many factors.  (I hate the impact texting has had on the language–‘IMO’.)  Here’s an interesting tidbit from The American Heritage Book of English Usage:

The American Heritage® Book of English Usage.
A Practical and Authoritative Guide to Contemporary English.  1996.

7. Pronunciation Challenges: Confusions and Controversy

§ 45. Ch

In Old English the sounds (k) and (ch) were both represented by the letter c. Later, under the influence of French spelling, Middle English scribes inserted an h after c to indicate the (ch) sound at the beginning of words, as in child. (The sequence tch became the usual way to represent this sound following short vowels, as in catch.) In English words of Greek origin the digraph ch represents a transliteration of Greek X (chi), and so is usually pronounced (k), as in chorus, architect. And in English words borrowed from French, ch is often pronounced (sh), as in charlatan, cachet.

[ Interestingly enough, I don’t really like using the abbreviation in the present participle as in, like "syncing".  I tend to write "sync’ing" to denote the abbreviation, though I recognize that this is definitely my own oddity. ]

* NB.  Some smart aleck will point out that periods and commas go inside the quotation marks.  I, for one, despise this notation, and as this is apparently only a US custom and not generally followed in the UK or Canada, I take the liberty not to do so for my own edification.