Batch program for copying file from one folder to another? - Microsoft Windows

This is a discussion on Batch program for copying file from one folder to another? - Microsoft Windows ; I haven't written a batch program since before Windows first came out so if anyone could offer some advice, I'd be very grateful. This applies only to Windows XP. What I'd like to do is create a little utility which ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Batch program for copying file from one folder to another?

  1. Batch program for copying file from one folder to another?

    I haven't written a batch program since before Windows first came out
    so if anyone could offer some advice, I'd be very grateful.

    This applies only to Windows XP. What I'd like to do is create a
    little utility which first finds the folder named "REPAIR" (usually at
    C:\WINDOWS\REPAIR but not always, depending on which drive Windows was
    originally installed to), then copies a certain file in the "REPAIR"
    folder and pastes this file into a folder named "SYSTEM32" (usually
    located at: C:\WINDOWS\SYSTEM32 but again, not always, depending on
    which drive Windows was originally installed to).

    Finally, if possible, I'd like this utility to run from Windows (ie.
    not a DOS-box application).

    Thanks again for any help.


  2. Re: Batch program for copying file from one folder to another?

    bjackson445@yahoo.com wrote:

    > I haven't written a batch program since before Windows first came out
    > so if anyone could offer some advice, I'd be very grateful.
    >
    > This applies only to Windows XP. What I'd like to do is create a
    > little utility which first finds the folder named "REPAIR" (usually at
    > C:\WINDOWS\REPAIR but not always, depending on which drive Windows was
    > originally installed to), then copies a certain file in the "REPAIR"
    > folder and pastes this file into a folder named "SYSTEM32" (usually
    > located at: C:\WINDOWS\SYSTEM32 but again, not always, depending on
    > which drive Windows was originally installed to).


    Example:
    copy "%SystemRoot%\repair\file1" "%SystemRoot%\System32\"
    copy "%SystemRoot%\repair\file2" "%SystemRoot%\System32\"
    copy "%SystemRoot%\repair\file3" "%SystemRoot%\System32\"

    Add /y if you want to automatically overwrite existing file, like:
    copy /y "%SystemRoot%\repair\file1" "%SystemRoot%\System32\"

    --
    Olof Lagerkvist sm6xmk
    ICQ: 724451 @ssa.se
    Web: http://here.is/olof


  3. Re: Batch program for copying file from one folder to another?

    Thanks Olaf. Do you know how I would activate these copy commands from
    an icon on the Windows Desktop? Ideally, I'd like our customers to
    simply be able to download a little program (represented as an icon on
    their Windows Desktop), double click on it, and the above copy commands
    would "run".
    Thanks.


  4. Re: Batch program for copying file from one folder to another?


    Put the commands in a batch file and put the batch file on the desktop. Or put the batch file in a safer place and put a shortcut to the batch file on the desktop.

    bjackson445@yahoo.com wrote:
    >
    > Thanks Olaf. Do you know how I would activate these copy commands from
    > an icon on the Windows Desktop? Ideally, I'd like our customers to
    > simply be able to download a little program (represented as an icon on
    > their Windows Desktop), double click on it, and the above copy commands
    > would "run".
    > Thanks.


    --
    Mike

+ Reply to Thread