简单的.bat不断弹出错误

时间:2017-04-03 00:10:05

标签: batch-file

当我要开始流式传输时,我正在制作一个.bat打开一些程序,但它说它无法找到路径。

这是我的蝙蝠:

taskkill /f /im Spotify.exe
taskkill /f /im Snaz.exe
taskkill /f /im obs64.exe
taskkill /f /im chrome.exe

cd /d "C:\Users\marka\AppData\Roaming\Spotify"
start C:\Users\marka\AppData\Roaming\Spotify\Spotify.exe

cd /d "F:\Stream Local\Snaz"
start F:\Stream Local\Snaz\Snaz.exe

cd /d "C:\Program Files (x86)\obs-studio\bin\64bit"
start C:\Program Files (x86)\obs-studio\bin\64bit\obs64.exe

start chrome https://www.twitch.tv/markaabo
TIMEOUT 1
start chrome https://streamlabs.com/dashboard#/
TIMEOUT 1
start chrome https://inspector.twitch.tv/#/
TIMEOUT 1
start chrome https://twitter.com/markaabo
pause

但是当谈到cd /d "F:\Stream Local\Snaz"它失败时会发出一条错误消息,说明" Windows无法找到F:\ Stream。控制你拼写正确,然后再试一次" (对不起,如果它被翻译错了我的电脑是丹麦语)

1 个答案:

答案 0 :(得分:1)

你缺少一些起始路径的双引号

修改 我已经将答案更新为更紧凑

 class Program
{
    static void Main(string[] args)
    {
        string content = File.ReadAllText("Labyrint.txt", Encoding.UTF8);

        // Use ToCharArray to convert string to array.
        char[] array = content.ToCharArray();

        Console.WriteLine(content);
        // Loop through array.
        for (int i = 0; i < array.Length; i++)
        {
            // Get character from array.
            char letter = array[i];
            // Display each letter.
            Console.Write(" Letter: " + letter + "  " + i);
            //Console.WriteLine(letter);
        }
    }
}