Windows – How to copy files and folders from one network share to another

batch filewindows

I have a file in one network shared folder \\170.23.23.34 and I want to copy the file to another share \\170.23.23.36.

What should be the batch script for the same.

Best Answer

Map the network drives in Windows to a specific letter. Once you do that, you can use xcopy to copy the necessary files.

e.g. XCOPY /E Y:/source-folder/ Z:/destination-folder

where \\170.23.23.34 would be assigned to Y: and \\170.23.23.36 would be assigned to Z:.