Foreigner,
Iska,
Всем привет,
выходит вот такая ошибка если файл существует в директорий. А если удалить, то запускается без проблем!
в чем причина не подскажете светлые умы?
Код:

Cannot convert value "text;exit" to type "System.Int32".
Error: "Input string was not in a correct format."
At D:\test_bat\pp.ps1:2 char:29
+ ... \mco.bat) { $a = [int][string](get-content D:\mco.bat)[-2..-1]} {$b = ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger