Skip to content

Instantly share code, notes, and snippets.

@pohzipohzi
Created January 15, 2018 07:46
Show Gist options
  • Save pohzipohzi/7744cd945b0e846195f084d289e881e0 to your computer and use it in GitHub Desktop.
Save pohzipohzi/7744cd945b0e846195f084d289e881e0 to your computer and use it in GitHub Desktop.
Simple shell script to backup .xlsm files in folder
#!/bin/bash
for filename in *.xlsm; do
cp "$filename" "backup/$(basename "$filename" .xlsm) $(date +'%Y%m%d%H%M%S').xlsm"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment