Forum

> > Off Topic > Windows CMD - *.bat file with parametres
Forums overviewOff Topic overviewLog in to reply

English Windows CMD - *.bat file with parametres

2 replies
To the start Previous 1 Next To the start

old Windows CMD - *.bat file with parametres

Avo
User Off Offline

Quote
Hi, I want to know (if it's possible) how to create *.bat file which can have parametres. I mean when I will use in Windows's cmd:
1
mybatfile.bat -action1
it will for example create new folder or when I use:
1
mybatfile.bat -action2
it will delete folder, but when I use:
1
mybatfile.bat
it'll just show some text with command echo

?? Anybody help ??

old Re: Windows CMD - *.bat file with parametres

Avo
User Off Offline

Quote
1
2
3
cls
@echo %1
pause

echoit.bat txt

shows:

1
txt

thanks

*edit*
> One more question: will it work when I convert *.bat file to *.exe file with .bat to .exe converter?
edited 1×, last 14.05.12 10:16:35 pm
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview