[Bat] command for using the System Path in Batch Processing

Source: Internet
Author: User

[Bat] command for using the System Path in Batch Processing

For example, if you want to enter the System32 folder in windows, enter "% SystemRoot %/system32" in the address bar of IE browser or in the "run" dialog box, and press Enter, you do not need to specify whether the system partition is disk C or disk D, because the system path will automatically locate the system partition. To put it bluntly, its function is actually equivalent to an absolute path: X:/Windows (where X is the system partition drive letter ).
Next, we will take the Windows XP system with the default system folder installed on drive C and the current user name is administrator as an example to list the absolute paths corresponding to several common system paths.
Current System drive letter % systemdrive % or % homedrive % C :/
Current System Directory % SystemRoot % or % WINDIR % C:/Windows
Current user folder % USERPROFILE % or % homepath % C:/Documents and Settings/Administrator
All user folders % allusersprofile % C:/users and settings/All Users
Temporary Folder 1% TEMP % C:/Documents and Settings/Administrator/Local Settings/temp
Temporary Folder 2% Systemroot %/tempc:/Windows/temp
ProgramFolder % ProgramFiles % C:/Program Files
For example, copy the activeskin. ocx file in the current directory to the C:/Windows/system32 directory.
Batch creation: the content is
@ Echo off
Copy activeskin. ocx % SystemRoot %/system32
Exit

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.