[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