1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Copy .BAT

Discussion in 'Scripting & Programming' started by westernkings, Dec 16, 2008.

  1. westernkings

    westernkings Gigabyte Poster

    1,432
    60
    107
    Hi guys,

    I am looking to make a .bat file so that I can copy 3 files from a network drive onto my computer, overwriting the ones locally.

    I am having a bit of trouble with it, can you guys help ?
     
    Certifications: MCITP:VA, MCITP:EA, MCDST, MCTS, MCITP:EST7, MCITP:SA, PRINCE2, ITILv3
  2. supernova

    supernova Gigabyte Poster

    1,422
    21
    80
    source_path would equal something like \\computername\share\path\filename unless you have mapped it to a drive then use drive:\path\filename Dest_path drive:\path\ do for each file. Y parameter forces it to overwrite



    Code:
    @echo off
    
    copy /Y source_path  Dest_path
    copy /Y  source_path  Dest_path
    copy /Y source_path  Dest_path
     
    Certifications: Loads
    WIP: Lots

Share This Page

Loading...