Answer the question
In order to leave comments, you need to log in
Powershell swearing at unicode?
ren "РУКРВВЕРХ! - Чужие Губы.mp3"
# Incomplete string token.
# At file.ps1:1 char:41
# + ren "РУКРВВЕРХ! - Чужие Р“С <<<< ѓР±С‹.mp3"
ren "“С"
ren '’ Р’' 1
# Rename-Item : Cannot bind argument to parameter 'Path' because it is an empty string.
# At file.ps1:18 char:4
# + ren <<<< '’ Р’' 1
Answer the question
In order to leave comments, you need to log in
try enclosing the string in single quotes:
rename-item 'P RЈRљP R'R'R•R RҐ! - R§SѓR¶RёRµ P“SѓR±S‹.mp3'
rename-item -path 'P RЈRљP R'R'R•P RҐ! - Чужие Губы.mp3' -newname 'new-name.mp3'
although there is a single quote in the name ...
then you need to try to escape it - \'
and you can also try move-item with -literalpath key.
For the compiler, I needed my own processing of Unicode with automatic recognition of UTF-8, the LiteConv utility - from the code examples for the library. Automatically recognizes what is needed - recodes what is not needed - does not spoil:
LiteConv-r825
This is if suddenly PowerShell is not necessary to use, but you just need to rename the files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question