Try using the JAR directly:
java -jar C:\kotlinc\lib\kotlin-compiler.jar file.kts
You could also try putting only kotlinc in a no-space path (e.g. C:\Kotlin) or running scripts through cmd.exe.
In the end, its important to note that the problem isn’t with Kotlin itself.