Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Script for copying or moving files from windows server to another remote windows server

$
0
0

Copy below 2 line into notepad and save as movescript.vbs

execute in command prompt

c:\cscript movescript.vbs  (Press ENTER)

Files will move to remote location.

=========================================

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile "C:\scripts\*.txt","\\servername\c$\share"

=========================================

for copy files to remote location

=========================================

Set objFSO = CreateObject("Scripting.FileSystemObject")

objFSO.CopyFile "C:\scripts\*.txt","\\servername\c$\share"

=========================================

Lets us know if you face any error. reply back to me on ravikirannetha@hotmail.com

Thank you.....


Regards Ravikiran MCITP



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>