Computer Hope

Other => Other => Topic started by: Zylstra on May 31, 2006, 04:55:56 PM

Title: Batch File
Post by: Zylstra on May 31, 2006, 04:55:56 PM
I made a batch file on a school computer today (my first batch file) and it went something like this:

dir C:\
dir C:\
C:\windows\desktop\acrobat~1.lnk
type C:\windows\desktop\Simple.bat

The batch file I made was named Simple.bat (because it was, (evil music), SIMPLE!)
Anyways, my question is this: Why did it annoyingly loop? I just saw the directory of C:\ fly by hundreds of times, as fast as the computer could run.
It would not stop until I edited the file and deleted its contents to make it stop.

(The computer at my school: Windows 98, 399 MHz, with oh lets say 128 MB RAM)
Title: Re: Batch File
Post by: viking on May 31, 2006, 10:51:06 PM
type C:\windows\desktop\Simple.bat

The path c:\windows\desktop\simple.bat is just like that? What windows version do you use?
I thing that the path has some spaces (like My Documents). In that case (when you have spaces in your path, like c:\documents and settings\user), your type should be:
type "c:\windows\desktop\simple.bat"
My guess is that you have in your path some spaces, and instead of just listing the bat file, your bat starts over and over again.
Title: Re: Batch File
Post by: Zylstra on June 01, 2006, 04:01:37 PM
Quote
Quote By: viking
type C:\windows\desktop\Simple.bat
 
The path c:\windows\desktop\simple.bat is just like that? What windows version do you use?
I thing that the path has some spaces (like My Documents). In that case (when you have spaces in your path, like c:\documents and settings\user), your type should be:
type "c:\windows\desktop\simple.bat"
My guess is that you have in your path some spaces, and instead of just listing the bat file, your bat starts over and over again.

c:\documents and settings\user is not the way that Windows 98 works. The school computer has Windows 98, your thinking about Windows XP.

The type command should have displayed the file information, I dont know what happened.