Category: Learned Today

The Remainder Theorem and XCOPY Backup Batch File

Remainder Theorem

Today I reviewed the Remainder Theorem at

Along the way, I got a refresher on the Division Algorithm for Polynomials.

Basically, the lesson helped me to recall the fun of synthetic division, polynomial division, and quickly determining if a number “a” is a solution to a polynomial p(x).

If you had high school algebra, perhaps it will be fun for you to go down memory lane. Perhaps it will merely bring back the nightmares.

Okay, daily, I look at a lot of things that merely jog my memory.   Recall of such stuff is kind of iffy. So, today, I thought I’d jot out a note and see how long it sticks.

So, this post is just a personal blog post.


Windows Command Line Backup Utility

To backup my lesson notes, I also decided I needed quick way to save my “homework” from my computer to my usb stick.

So, I figured the fastest way to save my homework would be to use a command line batch file with a shortcut on the desktop.

The following did the trick to copy contents of my DropBox folder to my USB drive (backup_homework_from_dropbox.bat):

Rem Backup Dropbox Homework Folder To USB
xcopy “C:\Studiies and Tools\Dropbox\Homework\*.*”  F:\Studies\Homework\   /D /E /C /R /I /K /Y /H

Yeah, misspellings and all, this works just fine, and it is quick.

The one line of code copies from C: Drive Dropbox folder to F: drive (Usb), with following enhancements:

  • Only backs up new or changed files:  /D
  • Will backup empty folders, new folders, and recursivelyall the files and folders below itself in the folder hierarchy: /E /R
  • Copies hidden & system files and folders: /H
  • When copying more than one file. for non-existent destinations, assumes that destination must be directory and creates it: /I
  • Copies file attributes (default would reset read-only attribute): /K
  • Answers “Yes” to any run-time queries:  /Y
  • Continues copying even if errors occur: /C

For a more demanding backup, I would have used RoboCopy, but this simple one-line batch file does the job well using only xcopy/