You are here

can I post a bat script?

30 posts / 0 new
Last post
agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
can I post a bat script?

I'v put together a batch script so you can quickly launch common command prompt commands.

I don't think this is considered self promoting , if it is I'm sorry you can take it down. I do have a argument about how I'm not breaking any rules if you want to here it.

Let me know what you think of it. If you have any suggestions on commands to add to it or any think I can do to make it better let me know.
I can make a PAF launcher for it if people would like me to, or will at least try to Smile
Download:
commander V2.bat
commander V2.txt

Download V3 to see some of what is coming:
commander V3.bat

Screen shots:
Main Menu
launcher Menu
Advanced Menu

Release Notes:

Commander V2

  • Organized it a bit better.
  • Add /I to the if.

To Do:

  • Add more commands.
  • Add a sub-menu for advance commands, which will allow to add options to commands e.g. (ping -a, ping -s 4).
Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 8 months ago
Joined: 2007-04-15 21:08
Why?

Why ever would you have anything like that? We've already got Command Prompt Portable with which users can do things like that. An application as simplistic as you describe has no chance of being official, I'd say; users can just ping 192.168.0.1 themselves with Command Prompt Portable.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
My plans were, to create

My plans were, to create something that was easy to use would have common commands ,one of them being ping, and even people that don't know much about cmd could use.
It was something I did out of boredom, I was not expecting it to be official it just would be cool if it could Smile

If you have a command you would like for me to put in it let me know.

EDIT: It is going to be a small project of mine, I thought about putting it in the Paf format so I can show it here but I have decided not to, could I post it in the off topic forum when I'm done with it?

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Ed_P
Offline
Last seen: 6 years 4 months ago
Joined: 2007-02-19 09:09
I lie the idea

I think these commands would be a good addition:

netstat -r
arp -a
ipconfig /all
tracert IPaddress

The ping and tracert IPaddress should be entered either via the command line or a simply menu.

I think posting it here to work out the bugs would be wise before converting it to a PAF format.

Ed

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
Cool, I will look at those,

Cool, I will look at those, and see if I can add them.
thanks Smile
EDIT: Im going to see if I can add it to the off topic forum.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Ed_P
Offline
Last seen: 6 years 4 months ago
Joined: 2007-02-19 09:09
off topic forum

Im going to see if I can add it to the off topic forum.

If you do please add a link to it here. I rarely check that forum.

BTW Another suggestion for your bat file, have it default to a particular IPaddress that the user can set when they install it. If they frequently ping a particular address more than others this reduces the key stokes needed to a single click. Smile

And if you want to go crazy with it you could add a menu to it to allow the user to invoke IPConfig options such as Release, Renew, and FlushDNS.

Ed

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
I posted it above. I might be

I posted it above.
I might be able to add a vb script or something to do what your talking about with the default ip.

BTW: you should come visit the off topic forum, we don't bite }:)

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

OliverK
OliverK's picture
Offline
Last seen: 3 years 8 months ago
Developer
Joined: 2007-03-27 15:21
the only advantage for this

the only advantage for this is the menu.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
and you don't have to type

and you don't have to type every thing out Smile

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

OliverK
OliverK's picture
Offline
Last seen: 3 years 8 months ago
Developer
Joined: 2007-03-27 15:21
butt hen I have to shift one

butt hen I have to shift one hand from the keyboard to the mouse, and then back. When i hit terminal, I really expect to do alot of typing. Plus, you have the tab key which will extend the commands for you.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
I'm not sure what your

I'm not sure what your talking about having to "shift one hand from the keyboard to the mouse" because the commands are all it the terminal and you don't have to move the mouse, except when you launch an application like you would do normally.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

powerjuce
powerjuce's picture
Offline
Last seen: 14 years 1 week ago
Developer
Joined: 2007-09-20 21:34
ease of use...

The idea is that when he is in terminal/cmd he is typing, he does not want to have to move the mouse. After while you could probably type

"pin"

faster than moving your hand off the keyboard, to the mouse, and then clicking the command on the menu or running this program.

that is all
~powerjuce

Please search before posting. ~Thanks

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
Oh, I see now. Its all in cmd

Oh, I see now. Its all in cmd there are menus but you don't click them, for ping all you do is type p and hit enter.
I'm trying to get some screen shots up to show some things it can do.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Darkbee
Darkbee's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2008-04-14 09:41
You need a hobby!

You should turn it into an AutoIt app! Biggrin

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
I thought about doing

I thought about doing something in ahk.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Darkbee
Darkbee's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2008-04-14 09:41
DrScheme is your friend.

Do it in Scheme... just for kicks.

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
I think I might stick with

I think I might stick with cmd for now, I'm still a noob :/
Also: yes i do need a hobby, Im trying to learn programing because I enjoy it Smile

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Darkbee
Darkbee's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2008-04-14 09:41
Check dis...

Basic 256 :evil:

[EDIT]On a serious note perhaps I should submit this as a request, would make a nice addition to the Education category!

crux
Offline
Last seen: 4 years 3 months ago
Joined: 2008-06-13 18:10
I want a command prompt hotkey.

I would also like a button/menu item/right-click menu in explorer/commander windows to open a command prompt in that folder.

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
I don't think that can be don

I don't think that can be done in a batch scrip.
You might be able to find something like that thats made in ahk, or you could do this http://www.tech-recipes.com/rx/232/right-click-to-open-a-command-prompt/

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Ed_P
Offline
Last seen: 6 years 4 months ago
Joined: 2007-02-19 09:09
Suggestion

Try:

if /I %com%==p goto ping

rather than:

if %com%==p goto ping
if %com%==P goto ping

the /I switch, if specified, says to do case insensitive string compares

It will cut your if statements in half.

Ed

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
Sweet, thanks

Sweet, thanks Smile

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Darkbee
Darkbee's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2008-04-14 09:41
Or...

Or you could use something like :toUpper %com%, to ensure the command is always upper-cased. Less to type but the net result is the same thing. Smile

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
Updated V2 see above for

Updated V2 see above for download.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Ed_P
Offline
Last seen: 6 years 4 months ago
Joined: 2007-02-19 09:09
Suggestions

Change
echo * Sub-munu Launcher *
to
echo * Sub-menu Launcher *

Change
set /p ping=Enter a ip to ping:
to
set /p ping=Enter an ip to ping:

Change
set /p format=Specify the drive leter you want to format:
to
set /p format=Specify the drive letter you want to format:

Change
set /p launch=Enter a program launch:
to
set /p launch=Enter a program to launch:

Change
echo Your windows version is:
to
echo Your Windows version is:

Change
echo Invalid command. Please make sure the commands you type
echo in are correct.
to
echo Invalid command. Please make sure the commands
echo you enter are correct.

Do note, none are technical in nature. Smile

Ed

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
:/ notepad does not have a

:/ notepad does not have a sell checker Sad I will make those changes now.
Thanks.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

solanus
solanus's picture
Offline
Last seen: 10 years 4 months ago
Joined: 2006-01-21 19:12
Unless your bat leaves traces...

...you don't actually need a launcher, you can just modify an appinfo.ini file to launch it (or them).
Check out this post:
https://portableapps.com/node/21757

I made this half-pony, half-monkey monster to please you.

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
The batch file it's self

The batch file it's self should not leave traces.
Cool, I think I will do that Smile Thanks.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
Updated: fixed some spelling

Updated:
fixed some spelling and grammatical errors.

Also: See the To Do list.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

agdurrette
Offline
Last seen: 1 month 1 week ago
Developer
Joined: 2008-01-16 13:55
Added some screen pictures

Added some screen shots

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Log in or register to post comments