How do you copy and past files in windows 7 from cmd file

Discussion in 'Windows 7' started by NICK@NUMBER11, May 27, 2010.

  1. NICK@NUMBER11

    NICK@NUMBER11 MDL Expert

    Mar 23, 2010
    1,354
    633
    60
    #1 NICK@NUMBER11, May 27, 2010
    Last edited: May 27, 2010
    Hi all

    I have created a batch file (CMD) to copy files from USB Stick to the windows and programs folders, the batch file says 2 files copied but they are not!!!

    Think it may be something to do with windows 7 built in security that stops the copying???

    here is the batch command

    @echo off
    cd /d %0\..

    echo Copying files...

    copy "*.dll" "c:\Program files\"
    copy "*.cmd "C:windows\system32\"

    echo.... done!!
    pause:eek::eek::eek:
     
  2. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,086
    1,298
    150
    What and why do you want to copy ?

    You can try use xcopy
     
  3. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    17,499
    15,288
    340
    + Run as Administrator... :p
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,707
    3,064
    300
    even using xcopy or run as Administrator won't make any difference you need to take ownership of files i,e icacls
     
  5. NICK@NUMBER11

    NICK@NUMBER11 MDL Expert

    Mar 23, 2010
    1,354
    633
    60
    Thanks all : Xcopy did the job!!

    Wanted to copy in some home-made cmd files that runs backup jobs - all sorted now thanks again