Windows offers the Startup folder, which lets you specify tasks or applications to execute at start-up or log-on. Is there an equivalent for shutdown or logoff? I would like to copy some files I update during the day to a network location before I log off and go home at night. —
A: You can find a variety of small utilities that will automate tasks at shutdown, but for a straightforward task like the one you’ve described, you really don’t need them. Just create a simple batch file to copy the updated files and end it with a command that shuts down the computer. You just have to remember to end your session by launching this batch file rather than by tapping the power button or shutting down via the Start menu.
Read the whole article from PC Online for details