Danilka_XaKeP
18-02-2018, 21:00
Здравствуйте. Потребовалось вывести текст из *.txt в *.bat. То есть у меня есть файл с текстом, например: Информация.txt в нём написана дата и время (для примера) и мне нужно эту информацию вывести прямо на диалоговое окно бат файла. Заранее спасибо)
Danilka_XaKeP,
Redirecting command input (<)
To redirect command input from the keyboard to a file or device, use the < operator. For example, to get the command input for the sort command from File.txt:
sort<file.txt
The contents of File.txt appear in the Command Prompt window as an alphabetized list.
The < operator opens the specified file name with read-only access. As a result, you cannot write to the file when you use this operator. For example, if you start a program with <&2, all attempts to read handle 0 fail because handle 2 is initially opened with write-only access.
Note
Zero is the default handle for the < redirection input operator.
SORT (https://ss64.com/nt/sort.html)
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.