asifm Posted September 26, 2014 Posted September 26, 2014 Hi Masters, Can someone please help me out? I want a script which can copy some zip files from one server to another server. Need for windows 2003 servers. For eg: From \\server1\share1 to \\server2\c$\temp Note: We have to specify file names which needs to be copied. Installable.zip, software.zip, plugins.zip, hotfix.zip .... etc. Thanks in Advance!
rickypike Posted September 26, 2014 Posted September 26, 2014 Hi would this script help? Its a Powershell Script for copying files from a source to a destination and forcing folder creation if it does not exist at the destination, see below: $targetdirectory = "D:\To" $sourcedirectory = "\\server\from" if (!(Test-Path -path $targetdirectory)) {New-Item $targetdirectory -Type Directory} Copy-Item -Path $sourcedirectory\file.zip -Destination $targetdirectory
jinnantonnixx Posted September 26, 2014 Posted September 26, 2014 Robocopy can do this easily. You can provide a set of filenames to copy on the command line. Robocopy "Robust File Copy" | Windows CMD | SS64.com
asifm Posted September 28, 2014 Author Posted September 28, 2014 This will not work on Win 2003 server.
Arthur Posted September 28, 2014 Posted September 28, 2014 Either download and install the Windows Management Framework to use the PowerShell script that @rickypike posted, or download the Windows Server 2003 Resource Kit Tools to get a copy of RoboCopy. Alternatively, use XCopy which is included with the OS.
kearton Posted September 28, 2014 Posted September 28, 2014 This will not work on Win 2003 server. If you're referring to Robocopy not working, you are mistaken. I've been using it on Windows platforms since 1999...
asifm Posted October 1, 2014 Author Posted October 1, 2014 I want to copy multiple files can you provide me syntax for xcopy.
Arthur Posted October 1, 2014 Posted October 1, 2014 I want to copy multiple files can you provide me syntax for xcopy. Click the XCopy link I posted above (or run XCopy /? from the Command Prompt) to view the syntax.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now