Solved Batch script returns errors, please help

January 31, 2014 at 15:35:11
Specs: Windows 7, 3.4GHz 12GB
I am making a "fake internet browser" script, each web page is in its own separate .bat file. The main .bat file calls the different files. Part of the script:

Echo Enter "exit" to return.
set /p webAdress="Web Adress: "
REM GOOGLE.COM
if %webAdress%==www.google.com (
cls
title NDSystems Web Browser - www.google.com
call http_google.bat
goto wIndex.404
)
if %webAdress%==google.com (
cls
title NDSystems Web Browser - www.google.com
call http_google.bat
goto wIndex.404
)

The thing is, each time I start the script, and enter "www.google.com" or just "google.com", cmd outputs "http_google.bat is not recognized as an internal or external command, excecutable program etc. etc."

Any ideas on what could be causing this? The method I've used here used to work earlier, but suddenly stopped working. (If more script is needed, I'll post more parts of it)

If infinity is infinite, is the square root of infinity infinite as well?
- Kurp Von Steiner

message edited by RainBawZ


See More: Batch script returns errors, please help

Report •


#1
January 31, 2014 at 19:34:10
http_google.bat is missing-in-action. Either you have the spelling wrong, or the batch is not in the active-path (cwd, system-default-path for executables). Simple enough to check: http_google

Report •

#2
February 1, 2014 at 05:21:22
I use CD "%~dp0" in the start of the script, and http_google is in the same folder as the main script. I don't really see why it behaves the way it does.

If infinity is infinite, is the square root of infinity infinite as well?
- Kurp Von Steiner


Report •

#3
February 1, 2014 at 07:24:31
✔ Best Answer
Leave ECHO on and see what it's doing. My guess is your starting directory is on a different drive.

How To Ask Questions The Smart Way


Report •

Related Solutions

#4
February 4, 2014 at 07:38:42
You might as well put in the full path to the http_google.bat, for example c:\mybrowser\http_google.bat, instead. just in case, its a minor change, and it would prove if that's the issue.

::mike


Report •

#5
February 9, 2014 at 13:24:32
It was starting in a temporary folder in AppData for some reason, thanks for the help :)

If infinity is infinite, is the square root of infinity infinite as well?
- Kurp Von Steiner


Report •


Ask Question