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? problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete files after copy completes or move files or cut/paste GrJ Computers, Javi, essejc, VB Script 2 14 Nov 2009
Recovery of Files from My Recently Changed Files Carol-Ann Vista General 7 16 Sep 2009
how to copy file every time it has changed? venioo VB Script 0 21 Apr 2009
copy-item changing files attributes on network copy failures jas PowerShell 4 31 Jan 2008
vista can't copy large files? another XP file-copy bug? Dave Vista General 3 26 Jan 2008