Solved

Best Way To Copy New Files To Remote Server

Posted on 2011-02-28
7
358 Views
Last Modified: 2012-05-11
What is the best way to copy new files to a remote server by scripting?  I have a server in the DMZ with staff pictures. I want to schedule a script at night to copy any NEW staff pictures to a folder on the DMZ server rather than wasting resources overwriting old images too.

1. Log into the remote server folder
2. Copy new files only
0
Comment
Question by:twcadmin
  • 4
  • 2
7 Comments
 
LVL 12

Assisted Solution

by:prashanthd
prashanthd earned 400 total points
ID: 34998522
use robocopy
0
 
LVL 12

Expert Comment

by:prashanthd
ID: 34998746
You can use the following command,create a batch file and schedule every night

This willcopyonly file which are not in destination_dir, rest are skipped

robocopy source_dir_path destination_dir_path *.jpeg

http://technet.microsoft.com/en-us/library/cc733145%28WS.10%29.aspx
0
 
LVL 5

Author Comment

by:twcadmin
ID: 34999058
I was hoping there would be a built in command without having to install a new package but no biggie. What about providing credentials to the DMZ server since its not part of the domain?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 12

Expert Comment

by:prashanthd
ID: 34999490
source and destination not in domain?
0
 
LVL 5

Author Comment

by:twcadmin
ID: 34999615
Correct. The server is in a DMZ and part of a workgroup not our internal active directory domain. When I connect to a shared folder I have to enter a different username and password.
0
 
LVL 12

Accepted Solution

by:
prashanthd earned 400 total points
ID: 35000072
You can try the following solution

Using Robocopy across domain

http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_26498453.html
0
 

Assisted Solution

by:Cam3ron
Cam3ron earned 100 total points
ID: 35000180
I think the set params=/e /z line here will accomplish part of your request....doublecheck but i believe it only writes new files to the destination folder....not overwirting current files. I'll have to look and see if i have anything with a user/passwrd command that would help.

here's an example of a batch file I run nightly.

echo off
set source="C:\backup\folder\files"

set destination="\\servername\backup\folder\myfiles"

set params=/e /z
C:\robocopy.exe %source% %destination% %params%
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question