Go Back   Computer Forums > General Computing > Software and Operating Systems
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 09-06-2011, 05:05 PM   #1
BSOD
 
Join Date: Aug 2011
Posts: 45
Default Can someone help me with a batch file in dos

Hi I am having a little trubble with my batch file,

When I try to go on to choice "3" "Directroy Play" from :eight It goes to the right place, but when I press 3 it goes to a completey diffrent place in the .bat file.

Can someone help me please?

@echo off
:start
cls
title GDAY!
color 3A
set /p name=HELLO WHATS YOUR VIEW ON THE WORLD TODAY?
echo %name%
echo The Local Time (As set in your BIOS)
time /t
date /t
pause
echo Please tell me what you think of this basic system checking tool.
pause
cls
echo Select Your Tool
choice /c:12345678 /m "1=Shutdown Computer 2=Convert FAT Drive to NTFS 3=Check Your NTFS Drive 4=Tasklist 5=Test Copy 6=Start Over 7=End Job 8=More Tools"
if errorlevel 8==goto eight
if errorlevel 7==goto end
if errorlevel 6==goto six
if errorlevel 5==goto five
if errorlevel 4==goto four
if errorlevel 3==goto three
if errorlevel 2==goto two
if errorlevel 1==goto one
ne
cls
echo Please comfirm shutdown (Press ENTER)
pause
cls
set /p NONE=Enter Password (Password Is Not Masked)
IF %NONE%==gqh73220 goto shutdown
echo "Wrong password!"
pause
goto start
:shutdown
cls
set /p sec=Enter The Amount Of Seconds Berfore Shutdown
shutdown -s -f -t %sec% -c Seya
echo Shutdown Initiated at %time%
set /p stop=To cancel shut down type STOP
if %stop%==stop shutdown -a
if %stop%==stop goto start
:two
cls
set /p NONE=Enter Password (Password Is Not Masked)
IF %NONE%==DDAF goto threestart
echo "Wrong password!"
pause
echo Wrong Password!
goto start
:threestart
set /p dl=Enter Drive Letter
convert FS:NTFS %dl%
pause
cls
goto start
:three
set /p drive=Enter Drive Letter (Don't Forget The :!!)
echo You Selected Drive %drive%
chkntfs %drive%
pause
cls
goto start
:four
tasklist
pause
cls
goto start
:five
copy c:\windows\system32\hal.dll c:\
pause
cls
goto start
:six
goto start

:eight
color 4A
cls
choice /c:12345 /m "1=Password Play 2=Start Over 3=Directory Play 4=Tree List 5=Remote Shutdown"
if errorlevel 5==goto fivefive
if errorlevel 4==goto fourfour
if errorlevel 3==goto threethree
if errorlevel 2==goto twotwo
if errorlevel 1==goto oneone
:fivefive
cls
set /p shutdowncommand=Enter Shutdown Time
echo You Selected %shutdowncommand% Secounds
shutdown -s -f -t %shutdowncommand% -c Fuck Off!!
:fourfour
cls
set /p dll=Enter Drive Letter and Folder Path
echo You Selected This Location %dll%
pause
tree %dll%
pause
goto start
:threethree
cls
set /p word=Enter Password
if %word%==DDAF goto threestart
echo WRONG!
goto==eight

choice /c:123 /m "1=Directory Play 2=Directroy Delete Play 3=Command-com"
if errorlevel 3==goto threet
if errorlevel 2==goto twot
if errorlevel 1==goto onet
:threet
cls
set /p dirpath=Have a Play around with the MD command use normal path letters
md %dirpath%
set /p dllll=Enter path to be displayed
dir %dllll%
pause
goto start
:twot
cls
set /p path=Enter path for directroy to be deleted
echo You Selected This Path %path%
pause
rd /s %path%
dir /w %path%
:threet
goto start

cls
:twotwo
goto start
neone
cls
set /p password1=Enter Password
if %password1%==DDAF goto==onestart
echo Wrong Password!
goto eight
nestart
echo Password Works
pause
goto start
:end
__________________

crashoveride is offline   Reply With Quote
Old 09-13-2011, 04:40 AM   #2
Fully Optimized
 
BikerEcho's Avatar
 
Join Date: Feb 2011
Location: Denmark
Posts: 4,013
Default Re: Can someone help me with a batch file in dos

i am having troble understanding what you are having troble with.
can you explane step by step what you are doing when opening the file till the problem starts?
also i can see those smilys have been converted from text to that ugly yellow thing, what is the propper text?
__________________

__________________
MOBO: Asus Maximus 6 Hero - GPU: Gigabyte GTX 980ti xtreme - CPU: I7-4770K - PSU: Corsair AX760
RAM: Corsair Vantage 2x4GB - SSD: Samsung 840 EVO 512 + LiteOn LCS-256 - Case: NZXT H440
BikerEcho is offline   Reply With Quote
Old 09-13-2011, 08:22 AM   #3
Fully Optimized
 
strollin's Avatar
 
Join Date: Mar 2011
Location: USA
Posts: 1,941
Default Re: Can someone help me with a batch file in dos

I'm not sure if this is your only problem but -
Code:
:threethree
cls
set /p word=Enter Password
if %word%==DDAF goto threestart
echo WRONG!
goto==eight
That should be goto eight, not goto==eight
strollin is offline   Reply With Quote
Old 09-13-2011, 09:15 AM   #4
Daemon Poster
 
Dngrsone's Avatar
 
Join Date: Nov 2006
Location: 'Murica
Posts: 951
Default Re: Can someone help me with a batch file in dos

In the advanced forum editor, there is an option to turn off smileys in your text. Alternatively, you could enclose your code in a [ code] ... [ /code] header.
__________________
Civility, Substance, Subtlety, Style: Success
Dngrsone is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 08:19 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0