19 August,2024 by Rambler
Question: Could you supply the command for connecting to a folder on another Windows server? I need to create a connection to another folder share and then copy a file. The administrator has supplied me with user name & password
Answer: I'm assuming you have the folder share available .
From your requesting server. Note: I've select M:\ - customise according to the server reqs
--command to make connection
net use M: \\myserver.com\myfoldershare /USER:domain\myuser "my_password"
The command completed successfully.
change directory to M:\
--copy file
M:\ copy c:\temp\myfile.txt
--check to see if file is there
dir
Some alternative methods using Powershell
How to force a powershell copy-item file copy
Powershell find command and copy a file
Compare-Object Powershell to validate a folder copy
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |