0
I have a . bat that when executed calls a script.
My problem is that the files that are called by the script have "ç,á," type accents, things like that.
So when he looks for the file, he can’t find the right name.
Nome do arquivo: "Procuração.xls"
Chamada do script: "Porcura$ÕAo.xls"
With this it does not find the right file to run.
I’ve seen several topics about it, but I haven’t been able to implement any.
I’m currently using
U:
CHCP 1252
cd U:\PastaAberta\Progan
ECHO Aguarde o script executar...
Rscript script02.R
pause
Post your code for analysis
– Wictor Chaves
see if the answer to this question before helps: https://answall.com/questions/101740/como-trata-acentua%C3%A7%C3%A3o-em-arquivos-bat
– Adriano Gomes
@Wictorchaves I put the shape I’m using, which is still giving me the error
– Brenda Xavier
Is it the script that set which file to open? Because if the problem is in the script and not in the bat
– Wictor Chaves
What encoding was the file created with? Probably in a different encoding than the system you are calling from.
– anonimo
There is already a question very similar to yours at this link here at Sopt. I believe the answers contained there will be useful to you.
– ssebeck
try this code before starting the @chcp 65001 command
– filmesson