I'm running eclipse on windows and would like to automatically backup my src direcories for all my projects. I installed cygwin and tried to make a simple backup script but I am having trouble properly specifying the destination filename. The backups should be in the current directory.directory of the script.

But really, this is not a good backup solution. Every time you run the copy, the previous state is erased. And it doesn't provide any history at all. Use version control. Use anything, even CVS (the useful functions of which can be learned in under an hour). Whichever version control system you choose:

I would recommend using a source code management system like git or hg (mercurial). If they are private projects BitBucket has a nice private project storage for free (given its less than 10 people on the project). Git works well on Windows and there is a plugin for eclipse called EGIT which would allow you to sync to a repo elsewhere. For programming, I would definitely recommend this over writing backup scripts.