How to craete batch file | JamiiForums | The Home of Great Thinkers

Dismiss Notice
You are browsing this site as a guest. It takes 2 minutes to CREATE AN ACCOUNT and less than 1 minute to LOGIN

How to craete batch file

Discussion in 'Tech, Gadgets & Science Forum' started by Logik, Aug 10, 2012.

  1. L

    Logik Member

    Aug 10, 2012
    Joined: Jan 17, 2012
    Messages: 32
    Likes Received: 2
    Trophy Points: 15
    Hi All,

    Kindly assist on how i can create batch file which will copy file from one location to another at a certain time. The files are always change everyday(dates)

  2. k

    kotinkarwak JF-Expert Member

    Aug 10, 2012
    Joined: Aug 5, 2010
    Messages: 386
    Likes Received: 1
    Trophy Points: 0
    Will assume that you talking about windows environment.
    The command to read on is "AT" which will be the scheduler for the tasks that will be contained in a batch file.
    What you will have in the batch file is bog standard "move" or "copy" command to move or copy the file from/to destination.

    Read on AT @ at

    Syntax for copy/move is as follows

    Copy \\wServer1\c$\FTP\Payment\Prod\FTPServer\InBound\K1UKAC.txt C:\BATCH\SYS\BACKUPS\K1UKAC_%DT%.txt

    You might want to use a "y" at the end of the above copy statement incases where you moving/copying multiple files.