5
Someone knows how to create .bat
to rename multiple files into multiple folders by inserting date and time of creation, not the current date?
Example:
Nome Data e hora de Criação
SCP Dados.mdb 03/06/2016 10:26
After renaming it is to stay like this:
Nome Data e hora de Criação
SCP Dados030616-1026.mdb 03/06/2016 10:26
Deleting any character before and after the created name leaving the extension .mdb
"<-SCP Dados030616-1026->.mdb
"
I already did that:
@echo Renomeando arquivo SCP Dados.mdb da BAHIA (BKP Manha)
dir \\S1WKSPCRCI\B$\CIBackups\Backup_BA\"SCP Dados.mdb" [AQUI ME MOSTRA A DATA]
set /p dt_arq_ba= Digite a DATA de Criacao do Arquivo da BAHIA: [AQUI INSIRO A DATA]
ren \\S1WKSPCRCI\B$\CIBackups\Backup_BA\SCP?Dados.mdb "SCP Dados%dt_arq_ba%.mdb" [AQUI ME DA O ARQUIVO RENOMEADO]
It’s working, but only manually renaming one by one, wanted to automate with the file creation date.
Edith the question and put what you have already done.
– stderr
I’m waiting for suggestions, thanks for your attention!
– Augusto Vasconcelos
It needs to be in . bat ?
– Roknauta
See if this helps http://stackoverflow.com/questions/30079757/rename-file-with-creation-date-time-in-windows-batch
– Gustavo Fast
You will need to loop the root directory using the "for" command combined with the "/D" command. Read more in this article:https://ss64.com/nt/for_d.html
– Daniel Silva