Bat command to connect the LAN machine and open the folder

Time:2020-11-29
Copy codeThe code is as follows:
@echo off
REM link up
net use \\192.168.2.3\share /user:username password
REM open shared folder
explorer \\192.168.2.3\share
Pause
net use \\192.168.2.3\share /delete
Exit

Usage of explorer command:
Explorer [/n][/e]<,/root],[path><,/select],[path filename>
Parameter description
/N means to open a new window in my computer mode. Usually, the root directory of the windows installation partition is opened.
/E means to open a new window in the “Explorer” mode. Usually, the root directory of the windows installation partition is also opened.
/Root, [path] means to open the specified folder, / root means to display only the files (folders) under the specified folder, not other disk partitions and folders; [path] indicates the specified path.
If you use the [path] parameter instead of the / root parameter, you can display the contents of other disk partitions and folders. In addition, [path] can also specify a network shared folder.
/Select, [path filename] means to open the specified folder and select the specified file, and [path filename] indicates the specified path and file name.
If the / select parameter is not added, the system will open the file with the corresponding associated program. If [path filename] does not follow the file name, the parent directory of the folder will be opened and the folder will be selected

Recommended Today

Summary of recent use of gin

Recently, a new project is developed by using gin. Some problems are encountered in the process. To sum up, as a note, I hope it can help you. Cross domain problems Middleware: func Cors() gin.HandlerFunc { return func(c *gin.Context) { //Here you can use * or the domain name you specify c.Header(“Access-Control-Allow-Origin”, “*”) //Allow header […]