Vertical Bar | can be used in DOS command usage examples

Source: Internet
Author: User


Vertical Bar | can be used in DOS commands

The function is to put the symbol before the process output, after making the sign process input.

The code for this example in Codego.net is as follows:

For example, two commands, "dir/s/b/a" and "find". txt "", the first shows all the files, folders in the current folder, and the second is to find a string containing the character ". txt".

Two commands you can "find all files and folders in the current folder that contain. txt." By using a vertical line connection.

DIR/S/b/a | Find ". txt"

Some situations that require a vertical bar (|):

For example, find a specific string or file or folder

This feature is perfect to be familiar with mastering findstr and for, while the pipe symbol (|) is essential when findstr and for are used simultaneously.

CLIP

Redirects the output of the command-line tool to the Windows Clipboard. This text output can be pasted

to other programs.

Parameter list:

/? Displays this help message.

DIR | Clip places a copy of the current directory list into the Windows clipboard.

CLIP < README. TXT places a copy of the Readme.txt into the Windows clipboard.

What, isn't it cool? Try it!



For example, put the current date on the Clipboard.

Echo%date:~,10%|clip



This article is from the "9515233" blog, please be sure to keep this source http://9525233.blog.51cto.com/9515233/1626957

Vertical Bar | can be used in DOS command usage examples

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.