Tech Support Guy banner
Status
Not open for further replies.
1 - 7 of 7 Posts

· Registered
Joined
·
37 Posts
open notepad and enter

net session
net file

Do a save as and name the file "whatever.bat". Make sure you change the "Save as type" from Text Documents (*.txt) to "All Files" otherwise, you'll end up with whatever.bat.txt.

Then, you can simply run the file. If you need to modify it later, you can right click it and select Edit.
 

· Registered
Joined
·
37 Posts
That's because your commands were executed, and the batch file completed.

If you want the cmd window to stay open, you can add a "pause" line to your batch job. You will then get a prompt to hit any key to continue...

@echo off
net session
net file
pause
 

· Registered
Joined
·
335 Posts
thats a batch file. you just use notepad to type in the things you would type into the command prompt. these aren't used as much anymore but they were invaluable during the DOS/Win95 days. they are still pretty handy tools.

http://ericphelps.com/batch/

thats a site with some cool batch files. you can copy and paste them into your notepad and adjust them to fit what you're trying to do.
 

· Registered
Joined
·
37 Posts
Not to be nitpicky, but system admins lives depend upon the use of batch files and scripts. Just because DOS is near death, doesn't mean batch files go with it.

Matrix,
There are books out there how to write and use batch files. It is essentially a very easy to learn scripting tool and can be used to run just about any command line utility or executable there is, and more.

Google to the rescue again...

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=writing+batch+files&btnG=Google+Search
 
1 - 7 of 7 Posts
Status
Not open for further replies.
Top