Whois Command Line Utility for Windows

This great command line utility for Windows by Mark Russinovich over at SysInternals is the quick and easy way to get whois info for domain names or IP addresses. Whois performs the registration record for the domain name or IP address that you specify. Usage whois domainname [whois.server]whois IP address [whois.server] Domainname can be either […]

What is the Linux equivalent to RoboCopy?

The Linux equivalent to Window’s robocopy is the command line file mirroring utility called rsync. Whether you want to backup your data, distribute files securely or mirror your working documents over the internet from the office to home, between computers on your local network, or from your computer to your web server, rsync can get […]

Robocopy Examples

Examples of Microsoft’s Robocopy (robocopy.exe) syntax. Robocopy Example 1: Copy files from one computer to another, skipping files already in the destination. robocopy \Computer1reports \Computer2backup *.doc /S Robocopy Example 2: List files over 32 MBytes in size. robocopy C:xyz /MAX:33554432 /L Robocopy Example 3: Move files over 14 days old (note the MOVE option will fail if […]

Set IIS 6 (and IIS 7) custom HTTP headers from the command line

Command line method to set the Custom HTTP Headers.*Must execute from (default) c:InetpubAdminScripts: cscript adsutil.vbs set w3svc/HttpCustomHeaders “X-Powered-By: ASP.NET” “<Header 2>: <Value 2>” “<Header 3>: <Value 3>” Just replace “Header 2”: “Value 2” and “Header 3”: “Value 3” with your own values. Add more as desired. Note: This command updates/replaces current values and does not […]

Copy Command Line Output to Windows Clipboard Directly

Starting with Windows Vista and Windows 2003 Microsoft has finally included clip.exe.  With clip.exe you can copy items directly to the Windows clipboard from a command prompt.  XP (and earlier) users can get clip.exe from Microsoft with the Windows Server 2003 resource kit. You can use clip with a PIPE (|) operator in your command line […]

Testing If a Directory Exists from a Batch File

Going old school here. . . To check for the presence of a directory (or folder) you can use the IF EXIST statement. For example, to test for C:TEMP and then change to C:TEMP if it exists, else create the directory and change to it, use the following batch file: C:IF NOT EXIST C:TEMP GOTO […]

How to Copy Files Multi-Threaded with Robocopy in Windows 7

Robocopy, short for Robust File Copy, is a command-line directory replication and file copy command utility that first made available as feature in Windows Vista and Windows Server 2008, although it has been available as part of Windows Resources Kit. In Windows 7 and Windows Server 2008, Robocopy utility is further enhanced with ability to […]

Robocopy Syntax, Command Line Switches and RoboCopy Examples

RoboCopy (Robust File Copy) is a command-line file copying tool in Windows 7, and Windows Vista. Although RoboCopy has been available for free with the Windows Resource Kit, it has never been an official feature of the operating system until Windows Vista. Unlike other built-in file copying commands such as Copy and XCopy, RoboCopy is designed for reliable copy […]

Setting Windows Environment Variables With SETX

User specific environment variables can be set from My computer -> properties -> advanced -> environment variables. But when you want to do it from script, you need another way. You could perhaps create a script and make shortcut to start menu -> propgrams -> startup. Use folder C:Documents and SettingsAll UsersStart MenuProgramsStartup, if you […]

Windows Command Prompt: Auto-Complete Paths and Filenames

SUMMARY: Let Windows automatically complete your keyed-in paths and filenames. If you regularly use the Windows Command (or DOS) Prompt (CMD.EXE), you may find it cumbersome to type in long directories or filenames. With this trick, you can use the TAB key to have Windows automatically complete your path or filename. For example, if you […]