Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Скриптовые языки администрирования Windows (http://forum.oszone.net/forumdisplay.php?f=102)
-   -   Как вывести текст из *.txt в *.bat (http://forum.oszone.net/showthread.php?t=333261)

Danilka_XaKeP 18-02-2018 21:00 2798832

Как вывести текст из *.txt в *.bat
 
Здравствуйте. Потребовалось вывести текст из *.txt в *.bat. То есть у меня есть файл с текстом, например: Информация.txt в нём написана дата и время (для примера) и мне нужно эту информацию вывести прямо на диалоговое окно бат файла. Заранее спасибо)

Казбек 18-02-2018 21:25 2798839

Danilka_XaKeP,
  1. Цитата:

    Цитата https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490982(v=technet.10)
    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.

  2. SORT


Время: 21:21.

Время: 21:21.
© OSzone.net 2001-