To access network shared folder from Command Prompt, it cannot use cd command. In order to access shared folders, we need to mount it as a new drive by run the following command:
// Method 1 net use [drive letter]\\[machine]\[folder] // Method 2 pushd \\[machine]\[folder] // Example 1 net use z: \\machine_name\shared_folder_name // List folders on shared drive dir net use z: // Example 2 pushd \\machine_name\shared_folder_nameBoth methods can do the same things, but the different is the second method will allocate and change current directory to the new drive automatically by the allocated drive is started from unused reversed alphabetical order.
To remove mounted drive, we can use the following command to delete it.
net use [drive letter] /delete // Example net use z: /delete
No comments:
Post a Comment