Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6997589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:18:10+00:00 2026-05-27T20:18:10+00:00

I have two folders (say Source and Working). Now within these, there are 100s

  • 0

I have two folders (say Source and Working). Now within these, there are 100s of other files/folders.

Now, the folder Source gets updated periodically (i.e. some files/folders may change or get added). I am trying to keep both the folders in sync.

So I need a batch command such that only the files/folders which are new/modified in "Source" get updated into the "Working" folder.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:18:10+00:00Added an answer on May 27, 2026 at 8:18 pm

    You do not need a bat file. Just use the xcopy with some parameters. Try:

    xcopy <path to source> <path to destination> /D /E /C /Q /H /R /Y /K 
    
    
    
    source  Specifies the file(s) to copy.
    destination Specifies the location or name of new files.
    /A  Copies only files with the archive attribute set, doesn't change the attribute.
    /M  Copies only files with the archive attribute set, turns off the archive attribute.
    /D:m-d-y    Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
    /EXCLUDE:file1 [+file2][+file3]...  Specifies a list of files containing strings. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.
    /P  Prompts you before creating each destination file.
    /S  Copies directories and subdirectories except empty ones.
    /E  Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.
    /V  Verifies each new file.
    /W  Prompts you to press a key before copying.
    /C  Continues copying even if errors occur.
    /I  If destination does not exist and copying more than one file, assumes that destination must be a directory.
    /Q  Does not display file names while copying.
    /F  Displays full source and destination file names while copying.
    /L  Displays files that would be copied.
    /H  Copies hidden and system files also.
    /R  Overwrites read-only files.
    /T  Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.
    /U  Copies only files that already exist in destination.
    /K  Copies attributes. Normal Xcopy will reset read-only attributes.
    /N  Copies using the generated short names.
    /O  Copies file ownership and ACL information.
    /X  Copies file audit settings (implies /O).
    /Y  Suppresses prompting to confirm you want to overwrite an existing destination file.
    /-Y Causes prompting to confirm you want to overwrite an existing destination file.
    /Z  Copies networked files in restartable mode.
    /B  Copies the Symbolic Link itself versus the target of the link.
    /J  Copies using unbuffered I/O. Recommended for very large files.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two source files created in unix folder say file1.dat and file2.dat. I
I have two custom value transformers contained within my Other Sources folder, bound to
Have two folders with approx. 150 java property files. In a shell script, how
in /usr/local i now have two mysql folders: mysql-5.1.34-osx10.5-x86 mysql-5.1.37-osx10.5-x86_64 is it possible to
I have two .ascx files in the same folder in an ASP.NET MVC project.
I have a folder with two files: Awesome.File.20091031_123002.txt Awesome.File.Summary.20091031_123152.txt Additionally, a third-party app handles
I'm having some issues using TortoiseSVN/SVN with working folders and the .SVN folder. Say
Let’s say I have two folders in my PHP server root directory: x and
I have two paths, let's say: rootfolder1 rootfolder2 While the folder names are different,
I have WCF service folder let's say : TestService and it contains following folders

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.