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,503
    720
    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,483
    1,502
    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
    18,681
    18,589
    340
    + Run as Administrator... :p
     
  4. urie

    urie Moderator
    Staff Member

    May 21, 2007
    9,039
    3,388
    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,503
    720
    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