This is the second installment of VoiceTutorial's guide on Batch Files. In this lesson, I will show you how to use input and output when writing these files.
Download page for Notepad++ http://notepad-plus-plus.org/download...
The command for output is "echo".
To take input, use the command "set /p variablename=prompt text here"
VARIABLES: INFO
Variables are sections memory in a computer that can store data. They can be addressed in whatever language you use by what is called an identifier. In our case, the identifier is what is in between the "%" signs. Until later, we will only be using string input (specified by the /p" which records a series (or array) or characters until an end-of-line character (enter) is detected.
So when a variable is created, memory is allocated (cleared and/or assigned) for the variable name. So when your program refers to your variable name (for example purposes, say it is "myvar") myvar, it requests from memory whatever is stored in the memory allocated to "myvar". If the user had entered "herpderp" and you called myvar, then it would load the series of characters "herpderp" into memory.
Смотрите видео Input and Output in Batch Files [2/8] онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь VoiceTutorial 30 Январь 2012, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 9,77 раз и оно понравилось 4 людям.