This is a method that prints the values queried in batch BAT

Updated on technology 2024-05-23
15 answers
  1. Anonymous users2024-02-11

    Couldn't I add the output as a text to the end of each command and then print?

    print [/d:printer]

    del q or use.

    echo off

    for /f "tokens=2 delims=:" %%i in ('ipconfig /all ^|find /i "ip address"') do (

    for /f "tokens=2 delims=:" %%j in ('ipconfig /all ^|find /i "subnet mask"') do (

    for /f "tokens=2 delims=:" %%k in ('ipconfig /all ^|find /i "default gateway"') do (

    echo %%i

    echo %%j

    echo %%k

    prn

  2. Anonymous users2024-02-10

    sqlplus add a spool d: to the query result and the query result will be written to the file.

    The batch then extracts the variables with for reads.

  3. Anonymous users2024-02-09

    In the case of mysql, bat has a ">" command, which means to output the content to a file.

  4. Anonymous users2024-02-08

    After querying, output to text, and then read the data from the text and you're good to go.

  5. Anonymous users2024-02-07

    bat inside, to be stored as a file.

  6. Anonymous users2024-02-06

    Now that you're done with the batch.

    The next step is to hide and execute, right?

    It would be better to use a more flexible Windows script to invoke your batch.

    A very simple little script.

    Let's say your batch is c:

    Then write it in Notepad.

    set ws="")

    c:\",0

    Save as a file with a VBS extension.

    Run it to run your batch in the background.

    You can continue to expand.

    For example, just let the batch process be released from the script.

    Or delete the original batch after running, and so on.

    It's up to your imagination.

  7. Anonymous users2024-02-05

    1. First of all, in the computer, create a new txt file and write a small program.

    4. Hide the extension of the known file, and remove the previous tick.

    5. Finally, go back to the txt file you just created, right-click to rename, and click Yes in the pop-up box, so that it will become a bat file.

  8. Anonymous users2024-02-04

    You can use redirects to save the output to a file.

    Symbols and symbols are two commonly used redirection symbols. > will empty the contents of the original file, >> append content to the file, and create a file if the file does not exist.

    Here's how to use it:

    echo hello world >

    Once run, the hello world will be output to the above equivalent to the following **:

    echo hello world 1>

    Where 1 means that the standard output is redirected, which is the normal output content.

    The 2 > means that the error message will be output to the screen, so that the hello world will be displayed on the screen, and only the error message will be saved in it.

    echo hello world >>

    The above statement uses 2", which means the append, if the content is not empty, the hello world will be saved on a new line after the last line.

  9. Anonymous users2024-02-03

    @echo off

    call "Batch path">d: Results. txtstart notepad d: Result. txt as @echo off

    call "d:\">d: Results. txt

    start notepad d: Result. txt

  10. Anonymous users2024-02-02

    Example 1920 1080 >>

    Use "" or 1 > to direct the output directly to the file.

  11. Anonymous users2024-02-01

    For example, enter your stuff into the same directory.

    call "Batch processing">>c:\

  12. Anonymous users2024-01-31

    with the redirect command.

    > the first is an overlay redirect, when the redirected file has content, its content will be deleted and rewritten, and the second is a write redirect, when the redirected file has content, its content will not be deleted, e.g. echo"Example 1">c:\

    echo "Example 2">>c:\

    As long as you repeat the above command a few times, you will see its characteristics.

  13. Anonymous users2024-01-30

    There are a few buttons on the printer, and the green button is not in place or is it pressed by something.

  14. Anonymous users2024-01-29

    This is really not true, batch processing still has great limitations.

  15. Anonymous users2024-01-28

    Batch processing is really not powerful in terms of numerical calculations and standard inputs and outputs.

Related questions
3 answers2024-05-23

Are you copying the entire file or a specific file?

1. Specific Documents. >>>More

7 answers2024-05-23

c:cd\

attrib -s -h -r >>>More

3 answers2024-05-23

echo off

del "c:\documents and settings\administrator\application data\microsoft\templates\" /q >>>More

10 answers2024-05-23

attrib c: windows system32 +h, pay attention to the spaces. >>>More

9 answers2024-05-23

Suppose the server IP is, and then share the directory of abc, and set it to anyone can modify it, the following is **: >>>More