Skip to content

Instantly share code, notes, and snippets.

@Microjus
Last active December 31, 2022 23:59
Show Gist options
  • Save Microjus/8b69a6d5357f96f478f9a0c8a030bb43 to your computer and use it in GitHub Desktop.
Save Microjus/8b69a6d5357f96f478f9a0c8a030bb43 to your computer and use it in GitHub Desktop.
Loop for para renomear lista de arquivos.
#!/usr/bin/env bash
#------------------------------CABEÇALHO---------------------------------------|
#
# AUTOR: | Microjus <[email protected]>
# URL: | https://github/Microjus/Micro-ProgressBar_V4/
# DATA: | 2021-25-17
# PROGRAMA: | Micro-progressbar_v4
# VERSÃO: | final
# LICENÇA: | MIT
# DESCRIÇÃO: | Coloque este script em uma pasta
# | e seja capaz de renomear qualquer
# | quantidade de arquivos, com esse loop for.
#
# TODAS ALTERAÇOES DEVE SER FEITAS MANUALMENTE
i=0
for file in MP4* mp4* ; do
i=$(( $i + 1)); mv "$file" "$i.mp4"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment