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 7659317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:19:02+00:00 2026-05-31T13:19:02+00:00

I Use the following VB script( Shell object ) to copy folders & files

  • 0

I Use the following VB script( Shell object ) to copy folders & files from \server\kits_location To D:\ ,

We also get Displays of the Copying Files progress dialog as the folder is being copied.

Source PATH – \\server\kits_location

Target PATH – D:\

This VB script run every week in order to update files on the target drive “D:\”

Usually files on source ( \server\kits_location ) not modified so in this case we not have difference between source files to target files

Because files are very big ( 1-10G) ,

I want to copy only files that have different modify date

so only source files that has diff modify date from target files will copied to target drive ( D:\ )

Please advice what I need to add in my VB script in order to copy only the diff files from source to target

my VB script

     createobject("wscript.shell").popup "Start Copy FCO Kits from network server - \\server\kits_location\ to D:\ drive ", 2, "", 64 
     Set objShell = CreateObject("Shell.Application")
     Const FOF_CREATEPROGRESSDLG = &H0&
     strPictureTargetDIR = "D:\" 
     Set objFolder = objShell.NameSpace(strPictureTargetDIR) 
     ' Copy  Kits from network server to D:\ drive
     objFolder.CopyHere "\\server\kits_location\", FOF_CREATEPROGRESSDLG
     set objShell = Nothing
  • 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-31T13:19:02+00:00Added an answer on May 31, 2026 at 1:19 pm

    You could use XCOPY like this to copy from a source to destination directory

    Please change your paths to suit

    I have used these switches

    • /f Displays full source and destination file names while copying.
    • /d copies all Source files that are newer than existing Destination files
    • /s Copies folders and subfolders except for empty ones.
    • /e Copies any subfolder, even if it is empty.
    • /y Overwrites existing files without prompting you
    • /h Copies hidden and system files.
    • /r Overwrites read-only files

      Dim Path1
      Dim Path2
      Path1 = "C:\temp\*.*"
      Path2 = "C:\test\"
      Call XcopyFiles(Path1, Path2)
      
      Sub XcopyFiles(strSource, strDestination)
          Dim wsh
          Set wsh = CreateObject("wscript.shell")
          wsh.Run "xcopy.exe """ & strSource & """ """ & strDestination & """ /f /d /s /e /y /h /r", 1, True
          Set wsh = Nothing
      End Sub
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use the following Bash Shell script to list the .txt files recursively under
I found following piece of code written as a shell script to read from
I happen need to use the following shell script find . -type f -exec
When I try to use curl command in my shell script I get the
The following curl statement works OK in my shell script. curl -Ld'username=user&password=password&source=oksoft&dmobile='$mnumber'&message=Slave is working
I am trying to use the following script in asp.net: <script language=javascript type=text/javascript> function
Getting an error when i use the following script to show a div when
The following script is for finding one motif in protein sequence. use strict; use
I use the following for a jQuery link in my <script> tags: http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js Is
I have an image uploading script in which i use the following setup to

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.