Your True Business Partner.

Friday 19 April 2019

Task Scheduler Auto Copy file from one location to another | Bat File

1. Create Text file.
2. Copy the code as shown in video.
3. Save as .bat file.
4. Create Schedule task in administrator tool.
5. Locate .bet file as a program file.
6. Finished the task now its takes back after 24 hours to your destination location.
7. Video Link is Here......


Code:


@echo offset source="D:\BackUp"set target="\\192.168.1.2\Backup"
FOR /F "delims=" %%I IN ('DIR %source%\*.zip /A:-D /O:-D /B') DO COPY %source%\"%%I" %target% & echo %%I & GOTO :END:END


then save as .bat file and run the file through task manager.

About the Task Scheduler?

The Task Scheduler service allows you to perform automated tasks on a chosen computer. With this service, you can schedule any program to run at a convenient time for you or when a specific event occurs. The Task Scheduler monitors the time or event criteria that you choose and then executes the task when those criteria are met.

Where Task Scheduler is installed

The Task Scheduler is automatically installed with several Microsoft operating systems.
Task Scheduler 1.0 is installed with the Windows Server 2003, Windows XP, and Windows 2000 operating systems.
Task Scheduler 2.0 is installed with Windows Vista and Windows Server 2008.
The Task Scheduler 2.0 API should be used in developing applications that use the Task Scheduler service on Windows Vista. For more information, see Task Scheduler Reference.
Task Scheduler is started each time the operating system is started. It can be run either through the Task Scheduler graphical user interface (GUI) or through the Task Scheduler API described in this SDK.

Task 

A task is the scheduled work that the Task Scheduler service performs. A task is composed of different components, but a task must contain a trigger that the Task Scheduler uses to start the task and an action that describes what work the Task Scheduler will perform.

Task Actions

The work items performed by a task are called actions. A task can have a single action or a maximum of 32 actions. Be aware that when multiple actions are specified, they are executed sequentially.

Types of Actions

The following table of actions describes the type of work or actions that can be accomplished by a task.
Type of Action
Description
ComHandler Action
This action fires a COM handler.
Exec Action
This action executes a command-line operation such as starting Notepad.
E-mail Action
This action sends an email when a task is triggered.
Show Message Action
This action shows a message box with a specified message and title.


Specifying Actions

The actions of a task are specified when the task is defined and stored in a collection of actions used by the Task Scheduler service. The following table lists links to reference topics for the APIs and XML elements that are associated with actions.

Task Triggers

A trigger is a set of criteria that, when met, starts the execution of a task. Task Scheduler provides both time-based and event-based triggers that can start a task in several different ways. A given task can be started by one or more triggers. A task can have a maximum of 48 triggers.
Time-based Triggers

Time-based triggers start tasks at specified times. This includes starting the task once at a specific time or starting the task multiple times on a daily, weekly, monthly, or monthly day-of-week schedule.

Event-based Triggers

Event-based triggers start a task in response to certain system events. For example, event-based triggers can be set to start a task when the system starts up, when a user logs on to the local computer, or when the system becomes idle.

Multiple Triggers

Each task can be started by one or more triggers, allowing the task to be started in any number of ways. However, multiple triggers are implemented differently in Task Scheduler 1.0 and Task Scheduler 2.0.
In Task Scheduler 2.0, each trigger is defined by a separate trigger API that is associated with the task through the trigger collection.
In Task Scheduler 1.0, multiple triggers can be thought of as a schedule, a set of times at which the task starts. In this case, the schedule is the set of times (specified by the union of all of the triggers associated with the work item) at which a work item will execute.


Thank you for support,
For more help please Contact US:
Your True Business Partner
Be Happy Always...

No comments:

Post a Comment