Windows 7 Help to make a Batch command

Juraj

New Member
Joined
Feb 5, 2014
Messages
1
After a lot of hours of Google search I think that really need your help, because I just learn Batch. I make commands for a .bat file similar .cmd, an improved personal assistent with simplier command of human language and one of his functions would be a websearch on Wikipedia. But now... I've problem to make something like this:

Code:
:what is 'empty field to fill'
start chrome.exe http://en.wikipedia.org/wiki/'filled from first line'
goto start
E.g.:
Code:
:what is 'Adam'
is a pseudo-command because of cmd.exe will open chrome.exe on url: http://en.wikipedia.org/wiki/Adam, also will fill empty part of url

Thanks for any usable advises
 


Last edited:
Solution
To create a batch file that can open a web browser and search for a specific term on Wikipedia, you can follow these steps:
  1. Create a batch file with the following code:
    Code:
    @echo off set /p search_term="Enter the search term: " start chrome.exe "http://en.wikipedia.org/wiki/%search_term%"
  2. Save this code in a file with a .bat extension (e.g., search_wikipedia.bat).
  3. When you run the batch file, it will prompt you to enter the search term. Once you enter the term, it will open Chrome and navigate to the corresponding Wikipedia page for that term. Here's a breakdown of how the code works:
    • @echo off: This command turns off command echoing, which prevents each command from being displayed before it's executed...
To create a batch file that can open a web browser and search for a specific term on Wikipedia, you can follow these steps:
  1. Create a batch file with the following code:
    Code:
    @echo off set /p search_term="Enter the search term: " start chrome.exe "http://en.wikipedia.org/wiki/%search_term%"
  2. Save this code in a file with a .bat extension (e.g., search_wikipedia.bat).
  3. When you run the batch file, it will prompt you to enter the search term. Once you enter the term, it will open Chrome and navigate to the corresponding Wikipedia page for that term. Here's a breakdown of how the code works:
    • @echo off: This command turns off command echoing, which prevents each command from being displayed before it's executed.
    • set /p search_term="Enter the search term: ": This line prompts the user to enter a search term and stores it in the variable %search_term%.
    • start chrome.exe "http://en.wikipedia.org/wiki/%search_term%": This command opens Chrome and navigates to the Wikipedia page corresponding to the search term provided by the user.
    Feel free to adjust the code further to enhance its functionality or tailor it to your specific requirements. Let me know if you need any more help or clarification!
 


Solution
Back
Top