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.
#!/bin/bash
for f in /cygdrive/c/Documents\ and\ Settings/USERNAME/My\ Documents/Eclipse\ Workspace/*
do
echo "in folder \"$f\""
cp -a "$f"/src/ ./????.bak
done
I would like ???? to be the project folder (not the absolute path). Thanks.