Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


March 11, 2008

How Those %&% Characters Can Cause a Batch File URL to Fail

RSS
Subscribe to Windows IT Pro | See More News and Analysis Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

At the command line, you find that you can run a command that opens your favorite Web site, but when you put that command in a batch file, it fails. What's going on? The command shell's treatment of certain characters commonly found in URLs, such as the percent sign (%) and the ampersand (&), can make batch files containing URLs fail, even though the commands work fine when you type or paste them after a command prompt. Learn why this problem occurs and how you can work around it in the article "Using URLs in Batch Files" by Alex K. Angelopoulos.

Alex also shows you how to write one-line batch files to open Web sites in which you regularly look up information. For example, he uses a batch file named winitpro to open up specific Windows IT Pro articles. To open the article "Using URLs in Batch Files," he just types the batch file's name followed by the article's InstantDoc ID:

winitpro 93483 

at the command line. Since you don't have this batch file yet, you can access the "Using URLs in Batch Files" article by going to www.windowsitpro.com/windowsscripting/article/articleid/93483/using-urls-in-batch-files.html. I've opened up this article for public viewing through April 3. If you enjoy reading this article, you can get more of this type of content by subscribing to Scripting Pro VIP.

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Related Events Check out our list of Free Email Newsletters!

News and Analysis eBooks Getting Maximum Performance from Your Web-based Applications

Business Process Automation - Managing Cost in Your Enterprise

Keeping Your Business Safe from Attack: Encryption and Certificate Services

Related News and Analysis Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement