How would I write this shell script as a Windows batch script?
- by Jeremy Banks
I haven't had a chance to test this script, I'm just using it as a suitable pseudocode. It's just supposed to copy all files in the current directory into a timestamped subdirectory.
ID="$(date +%Y%b%d%H%M%S)"
COMMITABLE="$(ls | egrep --invert-match ^(STATES|PARENT)\$)"
STATE_PATH="$(pwd)/STATES/$ID"
mkdir --parents "$STATE_PATH"
cp $COMMITABLE "$STATE_PATH"
ln -s "$STATE_PATH" PARENT