Run cmd command directly into the specified directory

Source: Internet
Author: User
Keywords win10 system
Tags copy create desktop directory document echo example files

How to run the cmd program into the specified folder it

Create a new document on the desktop, named 1.txt, if you want to find the C drive 360 ​​folder, first find this folder in the C drive, for example: My 360 folder in C: \ Program Files \ 360 In this path

[plain]

@ECHO OFF

cmd / k cd / d C: \ Program Files \ 360

Copy and paste the contents of the above 1.txt inside.

If you want to find the C drive 360 ​​folder, first found in the C drive this folder, for example: My 360 folder in C: \ Program Files \ 360 this path.

Copy and paste the following into 1.txt, save-close

[plain]

@ECHO OFF

cmd / k cd / d C: \ Program Files \ 360

Rename the suffix, change the bat suffix, a dialog box appears, select "Yes", and then you find 1.txt changed to 1.bat.

Double-click 1.bat, have a look, is not directly to this directory. Similarly, find another disk is like this.

Related Article

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.