Ravioli
Microboner
- Joined
- Nov 1, 2004
- Messages
- 5,097
- Reaction score
- 2
Im boored so im trying to learn some simple scripting of batch files. So i wrote a script that scans the folder that the bat file is in, with the option of chosing "Scan" or "Quit" and if you scan, you get to choose to scan again or quit, and it loops that way.
It works perfect, but there is one problem. It works ONLY on my computer. I send it to two different friends (using XP) and the bat file just crashes when you open it. Im using Windows 7 and it works for me, but i dont see how the differences in Windows can cause problems, because the DOS is essentially the same (when it comes to simple batch files) right?
I uploaded the bat file, please try it out and tell me the results and the OS you are using. Dont worry its not a virus, open it with notepad if you dont trust me, save it as .bat to test it.
If you still dont trust me, copy this code into notepad and save as .bat and try it.
So does anyone know what might cause this problem? Is it only my computer that works? Or is it only Windows 7 computers that works?
EDIT: sry for typo in title of thread, regardinG
It works perfect, but there is one problem. It works ONLY on my computer. I send it to two different friends (using XP) and the bat file just crashes when you open it. Im using Windows 7 and it works for me, but i dont see how the differences in Windows can cause problems, because the DOS is essentially the same (when it comes to simple batch files) right?
I uploaded the bat file, please try it out and tell me the results and the OS you are using. Dont worry its not a virus, open it with notepad if you dont trust me, save it as .bat to test it.
If you still dont trust me, copy this code into notepad and save as .bat and try it.
@echo off
echo This tool will scan all the files in this folder
echo Press S to Scan
echo Press Q to Quit
choice /c:SQ
if errorlevel 2 goto Q
if errorlevel 1 goto S
echo.
:START
:S
dir /s
echo. Press S to scan again
echo. Press Q to Quit
choice /c:sq
if errorlevel 2 goto Q
if errorlevel 1 goto S
echo.
:S
goto START
:Q
exit
So does anyone know what might cause this problem? Is it only my computer that works? Or is it only Windows 7 computers that works?
EDIT: sry for typo in title of thread, regardinG