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
What You Need to Know About Microsoft's x64 Server Product Plans

What do Longhorn Server, Windows Compute Cluster Server, and Windows Vista have in common? The x64 platform. ...

WinInfo Short Takes: 4th of July Special Edition

An often irreverent look at some of the week's other news, including a shortened work week thanks to the 4th of July, expensive Windows 7 pricing, Bing's modest monthly gains, IE 8 heading to work, Steve Jobs back at Apple, and so much more ...

How can I stop and start services from the command line?

...


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

Test Drive IT Solutions and Get Free Music Downloads
Solve your toughest IT problems with these free downloads and receive 5 free music downloads!


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 ITTV
IT Library Technology Resource Directory Connected Home asp.netPRO Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement | Reprints and Licensing