Windows Vista Forums

Copy changed files only?

  1. #1


    Daniel Erkan Guest

    Copy changed files only?

    Hi!

    I'd like to mirror a folder and its subfolders to another server
    regularly, but in order to save time and bandwidth, it should only copy
    files, that have actually changed.
    I would use robocopy, but unfortunately it pretty much only produces
    garbage under vista O_o

    Any ideas?


    Thanks,
    Daniel

      My System SpecsSystem Spec

  2. #2


    George Davis Guest

    RE: Copy changed files only?

    This script should do it:

    $changedFiles = dir | where { $_.Attributes -band
    [System.IO.FileAttributes]::Archive }
    foreach($file in $changedFiles)
    {
    $targetName = "z:\MySubDir\" + $file.Name
    Copy-Item -path $file.FullName -Destination $targetName
    }


    "Daniel Erkan" wrote:

    > Hi!
    >
    > I'd like to mirror a folder and its subfolders to another server
    > regularly, but in order to save time and bandwidth, it should only copy
    > files, that have actually changed.
    > I would use robocopy, but unfortunately it pretty much only produces
    > garbage under vista O_o
    >
    > Any ideas?
    >
    >
    > Thanks,
    > Daniel
    >


      My System SpecsSystem Spec

  3. #3


    Jacques Barathon [MS] Guest

    Re: Copy changed files only?

    "Daniel Erkan" <sho@gmx.li> wrote in message
    news:55largF25j5ekU1@mid.dfncis.de...
    > Hi!
    >
    > I'd like to mirror a folder and its subfolders to another server
    > regularly, but in order to save time and bandwidth, it should only copy
    > files, that have actually changed.
    > I would use robocopy, but unfortunately it pretty much only produces
    > garbage under vista O_o


    I am surprised that robocopy produces garbage under Vista. Are you using an
    old version of robocopy on Vista? Have you tried the now built-in version?
    If the built-in version doesn't work, what exactly is the "garbage" it
    produces?

    Jacques


      My System SpecsSystem Spec

Copy changed files only?

Similar Threads
Thread Forum
Help with files going to recently changed folder
Hi, i hope you will all be patient with me, i have had my laptop for a while but never used it hardly as was using my desktop until it died on me a...
General Discussion
Delete files after copy completes or move files or cut/paste
Hey, I am actually running it on command prompt but I couldn't find where to put it and i figure this is the closest thing to it. A script will work...
VB Script
Recovery of Files from My Recently Changed Files
Please Please help me. I was trying to clean up any files I wasn't using and I went into My Recently Changed Files and deleted everything in there...
Vista General
how to copy file every time it has changed?
Hi, I need to copy file to another folder everytime it has changed (backup copy of savegame :) ) Today I realized it could be automated. I know...
VB Script
copy-item changing files attributes on network copy failures
I came across very strange behaviour in copy-item today. When copying a read-only file repeatedly from the network to a local folder the first copy...
PowerShell
vista can't copy large files? another XP file-copy bug?
Can anyone else confirm this for me: the only references I find online refer to known bugs in XP, not Vista. Pulling a 3.18gb file over a...
Vista General
Recently Changed: Unable to open .jpg files from WM
I have WM set to read in plain mail only, but have always been able to click on the attachment icon on the right side of the info bar, click on the...
Vista mail