V
V
Vladislav1233211232019-02-08 16:37:37
cmd/bat
Vladislav123321123, 2019-02-08 16:37:37

How to make the system see the path in the batch file?

I made a batch file to delete a folder with the following command
rd /s /q "C:\Users\Ultron\AppData\Local\mRemoteNG"
But the batch file gives an error, says that the system could not find the specified path. In this case, the same command in CMD works and the path is found. What's the catch?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2019-02-08
@Vladislav123321123

You have Russian letters on your way.
By default, the encoding in cmd is cp866, and you most likely saved the batch file in the cp1251 encoding (or even worse in UTF8), so the Russian letters have become krakozyabry and this path cannot be found.
Either add the
chcp 1251 command before your command in the batch file
. Or save the batch file in cp866 encoding by any available means, just make sure that the Russian letters are correctly converted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question