Solved

Best Way To Copy New Files To Remote Server

Posted on 2011-02-28
7
356 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
Comment Utility
use robocopy
0
 
LVL 12

Expert Comment

by:prashanthd
Comment Utility
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
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 12

Expert Comment

by:prashanthd
Comment Utility
source and destination not in domain?
0
 
LVL 5

Author Comment

by:twcadmin
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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 video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now