I often need to make backup of a certain class of files, say all text files in a folder. A nice bash one-liner to achieve that is:
for i in *.txt; do cp “$i” “$i.backup”; done
On Windows this is even simpler. There you can simply do:
copy *.txt *.txt.backup
Advertisement