We help IT Professionals succeed at work.

how to automate a file transfer

hi everyone,

I have a microsoft windows 2003 server and every sunday a job runs on one server and create some files, which then some zip them and leave it in the same folder,
is there a way i can copy that zip file by setting up a schudler every sunday and copy it across to an other windows server 2003 machine which is sitting in an other location (not the same office)
the connection is always establsh between two office and i can see the machine.

Please help!!!
Watch Question

you could create a batch routing to copy the files using either a mapped network drive or an unc path.
for example
xcopy c:\your folder\*.ZIP \\server name\sharename this would copy all zip files choose your own switches depending on requirement


thans bradley but how can i schulde it so that it runs on specific time.
Simply put, you can create a batch file (such as     "transfer.bat" ) which contains the commands to transfer the files; and then run the job at a scheduled interval using the  "at" command (Make sure it is enabled in Windows Services).

The following "at" command will run the batch file "c:\transfer.bat" every Sunday at 10:00 am:

at 10:00 /every:su "c:\transfer.bat"

Once you enter the above command, you can issue the "at" command without parameters to verify all scheduled applications.

You will also need the "c:\transfer.bat" file for this to work which should contain the commands to copy the ZIP file from the local location to the other computer. This could be a simple "xcopy" command or an "ftp -s:file1.txt" where "file1.txt" has the contents of the FTP commands to open, login, transfer, and close the FTP session.

just create a file that contains this and call it something.bat then schedule the task using the scheduler
this link contains diagrams and information on using windows scheduler


please guys can you please explain step by step as i am new to it

i have created a bat file
and add a command
xcopy  D:\data\public\datadump1\iandata*.zip Y:\
(y is the mapped drive letter for \\\user\pgoodway\ian data\)

and i saved this file as BAT file ...now what should i do?
schedule this batch job to run via the scheduler
To schedule a new task
 Open Task Scheduler.
 Double-click Add Scheduled Task.
 Follow the instructions in the Scheduled Task wizard.


" To perform this procedure, you must be a member of the Administrators, Backup Operators, or Server Operators group, or have been delegated the appropriate authority, on the local computer. As a security best practice, consider using Run as to perform this procedure. For more information, see Default local groups, Default groups, and Using Run as.
" When creating a scheduled task, you must enter a user name and password, either in the Add Scheduled Task Wizard or in the Run as box in the Task tab of the scheduled task's property dialog box. When the scheduled task runs, the program you've scheduled runs as if it were started by the user you specified, with that user's security context.
" To open Task Scheduler, click Start, click Control Panel, and then double-click Scheduled Tasks.
" Confirm that the system date and time on your computer are accurate, as Task Scheduler relies on this information to run scheduled tasks. To verify or change this information, double-click the time indicator on the taskbar.
" If you want to configure advanced settings for the task, select the Open advanced properties for this task when I click Finish check box in the final page of the wizard. This opens the properties dialog box for the task. You can then change the program being run in the Task tab, fine-tune the schedule in the Schedule tab, customize settings in the Settings tab, or set user and group permissions in the Security tab.
" If the task program requires command-line options, type them in Run, after the task path.
" If the path to the task program includes spaces, type double quotation marks ("") around the entire task path. For example:

"C:\Program Files\Windows Media Player\Mplayer2.exe"
To use the scheduling service on Windows 98, NT, 2000, click on the My Computer icon located on the Desktop. Then double-click on Control Panel to get to the Scheduled Tasks folder.

On Windows XP and Server 2003 you can access this from the Start Menu and clicking on Settings and then Control Panel to Scheduled Tasks

Explore More ContentExplore courses, solutions, and other research materials related to this topic.